Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Problem with PHP timeout
PostPosted: Fri Apr 22, 2011 7:52 pm 
Offline
Senior Newbie

Joined: Wed Mar 02, 2011 9:56 pm
Posts: 7
I'm having a problem with a PHP process timing out on my linode.

I've updated php.ini max execution time to 300. I've verified that the max execution time is set in phpinfo. However, when I'm attempting to transfer a relatively large (100mb) file to S3, I can see the cron job start but then the transfer never occurs. I'm getting the following error message in php5-fpm.log

Apr 22 19:33:24.048456 [WARNING] [pool www] child 23746, script '/home/derek/public_html/foo/public//wp-cron.php' execution timed out (30.001523 sec), terminating

Apparently something is causing php to timeout at 30sec. I'm running a LEMP stack if that matters. Any ideas on what might be causing this this timeout? Thanks.


Top
   
 Post subject:
PostPosted: Fri Apr 22, 2011 7:58 pm 
Offline
Junior Member

Joined: Thu Nov 25, 2010 7:41 pm
Posts: 27
http://php.net/manual/en/function.set-time-limit.php


Top
   
 Post subject:
PostPosted: Fri Apr 22, 2011 8:00 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Is it being done through php-cli?

Check /etc/php5/cli/php.ini

By default on my Debian system it's set to 30 seconds there.


Top
   
 Post subject:
PostPosted: Fri Apr 22, 2011 8:11 pm 
Offline
Senior Newbie

Joined: Wed Mar 02, 2011 9:56 pm
Posts: 7
Thanks for the feedback. As far as I can tell (I'm not a programmer) set_time_limit() isn't called in the wp-cron.php file. So it should default to the max execution time setting?

The process should be running through php-fpm, but I went ahead and updated max execution time under cli and cgi's php.ini files and restarted php just to be safe. Still got the same error though.


Top
   
 Post subject:
PostPosted: Fri Apr 22, 2011 10:09 pm 
Offline
Senior Newbie

Joined: Wed Mar 02, 2011 9:56 pm
Posts: 7
Solved it! I was wondering why I was getting a timeout error instead of a max execution time exceeded error. It turns out at some point the past I had set request_terminate_timeout in php5-fpm.conf. I commented out that line and was able to get the script to run successfully.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group