I have set all limits to extreme, but still I get 503 error after script has processed 15 minutes (900 seconds). PHp does not give any errors. MySQL keeps going. Debug messages at the exact moment when 503 happens are: [uds://tmp/lshttpd/lsphp.sock] No Request has been processed successfully through this connection, the maximum connections allowed will be reduced! [xxx.xxx.xxx.xxx:61621-0#xxxxxxxxxx.xxx:lsapi] HttpExtConnector::tryRecover()... My test case is repairing (fixing indexes) lots of big tables (7.5 million rows) with latest phpmyadmin using latest Firefox. After the litespeed gives up mysql keeps processsing the command happily under hood. How should I set litespeed up so that in no case a php script connection is "dropped out" like this? I find all the settings very confusing, if 4000 second timeouts are not honored what should I do? My settings are: Server -> External App -> phpLsapi Name phpLsapi Address uds://tmp/lshttpd/lsphp.sock Notes Not Set Max Connections 60 Environment PHP_LSAPI_MAX_REQUESTS=5000 PHP_LSAPI_CHILDREN=60 Initial Request Timeout (secs) 4000 Retry Timeout (secs) 0 Persistent Connection Not Set Connection Keepalive Timeout Not Set Response Buffering No Auto Start Yes Command $SERVER_ROOT/fcgi-bin/lsphp -c ../php Back Log 100 Instances 1 Run On Start Up Yes Max Idle Time Not Set Priority 0 Memory Soft Limit (bytes) 200M Memory Hard Limit (bytes) 200M Process Soft Limit 0 Process Hard Limit 0 Server -> Tuning -> connection Max Connections 2000 Max SSL Connections 200 Connection Timeout (secs) 3600 Max Keep-Alive Requests 1000 Smart Keep-Alive No Keep-Alive Timeout (secs) 7 Send Buffer Size (bytes) 0 Receive Buffer Size (bytes) 0 I/O Event Dispatcher epoll (Linux 2.6 kernel) Max Cached Small File Size (bytes) 4096 Total Small File Cache Size (bytes) 200M Max MMAP File Size (bytes) 256K Total MMAP Cache Size (bytes) 400M Use sendfile() Yes SSL Hardware Accelerator (built-in) OpenSSL internal engine php.ini has max_execution_time = 3600 max_input_time = 60 memory_limit = 128M Took APC offlline, one less variable to debug. PS. I would like to set different timeout rules for each virtual host (high timeouts for the one I use for admin stuff, low for public site). Because virtual servers do not have individual connection timeout setting I am forced to put high value in server tuning setting and that means less tolerance to DoS for the public site.