We are running RHEL 4, PHP 4, MySQL4, Apache2 and everything seemed great in testing. However, now we have run into an issue that if a user clicks the refresh button multiple times, that it crashes the site. If the site is being used as normal, then there is no issue. It seems as though it does not release the apache processes. I imagine there is a configuration setting for this, but any ideas on what setting and what it should be set to?

Thanks,
Shane

Comments

shanefjordan’s picture

We just installed and tried this with RHEL 5, PHP5, MySQL5, and Apache2 with the same results.

sidharth_k’s picture

In your apache configuration is KeepAlive set to On?

Try to understand the following options in Apache and see if changing them helps...


StartServers
MinSpareServers
MaxSpareServers
MaxClients
MaxRequestsPerChild
MaxKeepAliveRequests

shanefjordan’s picture

We have the following settings --

Apache:

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit       40
MaxClients        40
MaxRequestsPerChild  2000

MySQL:

max_connections = 800
max_user_connections = 800
key_buffer = 36M
myisam_sort_buffer_size = 64M
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 3M
table_cache = 1024
thread_cache_size = 286
interactive_timeout = 25
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 32M
max_connect_errors = 999999
query_cache_limit = 1M
query_cache_size = 16M
query_cache_type = 1
tmp_table_size = 16M

What setting am I missing? I know there are thousands of sites running Drupal and they don't die when someone holds the refresh.

Thanks,
Shane

sidharth_k’s picture

Try changing the timeout to 15. Does this help?

shanefjordan’s picture

We have narrowed this down to MySQL processes sleeping. We took the same queries that are being ran from drupal and put them in a php script executing each one. We can hold the refresh on our script and it does not touch the server. Something in the Drupal code is affecting this, but we don't know what.

Thanks,
Shane

shanefjordan’s picture

The only real solution we could come to was to turn on page caching in the Drupal performance settings. We set our cache interval to 5 minutes, which we may play with as time goes on.

- Shane