![]() |
Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 (/thread-9729.html) Pages: 1 2 |
Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - circut_breaker - 02-24-2010 08:19 AM Welcome, One of my users get trouble with his application using ispCPOmega. He run some external programs using shell_exec, but execution of that commands took about 4 - 10 minutes. In this time, application have to be working, with established database connection, after fetching result decide what to do next... My first step like sys admin was configure in php.ini of his file right amount of resources (ram) and allocate additional time limit for executing his application. Thats how it looks: Code: max_execution_time = 2200; But he still got errors about Internal Server Error 500. So i check log files and found that reason is too short time of execution fcgi. So i made little changes in file called Code: /etc/apache2/ispcp/DOMAIN_NAME.conf That's how it looks after my changes: Code: # Any changes made to this file will be preserved. I had rebooted server several times. But my user still getting Internal Server Error 500... And log files says: Code: [Tue Feb 23 22:30:35 2010] [notice] mod_fcgid: process /var/www/virtual/domain_name/htdocs/converter.php(7401) exit(communication error), terminated by calling exit(), return code: 0 exit(idle timeout) If someone have any idea... i'm open, i will listen to anything... Regards :-( RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - kilburn - 02-24-2010 11:41 AM AFAIK, different fcgid versions support different subsets of directives in the VirtualHosts sections. This is, depending on your fcgid version, it is possible that a "BusyTimeout" directive inside a "VirtualHost" section (as you have it) does not override the base "BusyTimeout" set globally. Try to apply your modified settings globally (in the /etc/apache2/mods-enabled/fcgid_ispcp.conf file) and see if it makes a difference. If true, you've found the problem. Otherwise you got me! ![]() RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - circut_breaker - 02-26-2010 03:41 AM Welcome. I just now try Your solution. First i edit global file Code: /etc/apache2/mods-enabled/fcgid_ispcp.conf Now it have following content Code: <IfModule mod_fcgid.c> After change, reboot server. When it start, i run test script and found following errors: Code: [Thu Feb 25 18:21:48 2010] [notice] mod_fcgid: process /var/www/virtual/DOMAIN_NAME/htdocs/converter.php(31397) exit(communication error), terminated by calling exit(), return code: 0 So it still don't work like I want. Do you have any other ideas ? Is there any diagnostic tool what will show current configuration of fcgi ? - maybe then we find what's wrong with timeout... Regards RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - kilburn - 02-26-2010 05:02 AM Apply all your settings, not just these two (at least BusyTimeout is required too). I'm afraid that I don't know any way to display fcgid's effective configuration :S RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - circut_breaker - 02-26-2010 06:34 AM Do You know what kilburn ? After putting all my code and of course reboot i think it start's working. I don't want be happy to soon but as i said it's look working. I think Your solution help, Thank you ![]() But i still can't understand why... why when i put these lines in config of "website" it wont work... I know that master override slave config files, but if master was empty... why that don't use all parameters from slave ? Who knows... ![]() Regards RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - circut_breaker - 02-28-2010 06:14 AM After one day... stop working... Code: /converter.php(13926) exit(communication error), terminated by calling exit(), return code: 0 Same error... I have no idea... [attachment=1172] RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - kilburn - 03-01-2010 10:48 AM First of all, check that the config hasn't been regenerated by the panel (reloading the previous settings or something). As a workaround for this user, you might allow his website to execute external applications (see disabled_functions in php.ini). Then, he can call his converter script from the website by forking (double-forking might be necessary here) to the background and letting the conversion script just run without stopping the frontend script. The first thing to try would be just running something like: Code: exec('/path/to/background/converter.php file.input file.output 2>&1 >/path/to/stdout.file &'); RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - circut_breaker - 03-02-2010 05:31 AM I checked config files, there are not changed after reboot. Everything look like in posts above. kilburn - My user already use shell_exec. I have also try edit edit fcgi starter. Code: /var/www/fcgi/MY_DOMAIN/php5-fcgi-starter Code: PHP_FCGI_TIMEOUT=1200 But it won't help... Question remain open :-( Regards RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - kilburn - 03-02-2010 06:10 AM The final "&" appended to the command is the key here. It's supposed to relieve the command to the background, so that the fcgi call can end as expected while the converter keeps working until finishing... RE: Long time execution -exit(idle timeout), terminated by calling exit(), return code: 0 - circut_breaker - 03-03-2010 10:33 PM I see Your point but it's override trouble not solve. I need solution for my problem, many people around the world use fcgi for conversion and i don't see why it shouldn't work longer than few minutes... I need have running php because i want grab output Code: $output = shell_exec('something'); And after finish i want import that output into database... I know i can rewrite whole application, and execute commands like that Quote:$output= shell_exec('sometghing > output.txt');and ever if php / fcgi will be killed i can re-spawn it and read output.txt to get status... I know, i can workaround this... but why... it should work... and i want it in normal way... |