george7
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Unable to post & Unable to update WordPressJust another thought. The timeout values in the WordPress PHP code should be OK if the network connection works well, and particularly the DNS name resolution. It would be more advisable to find the network bottleneck that is causing the delays rather then hacking the PHP code.
In my case, I found that the Virtualbox DNS resolution was slow (I was running an Ubuntu development server for WordPress in Virtualbox). After changing the guest OS’s /etc/resolv.conf to external DNS servers, the lags disappeared and the timeouts no longer occurred.Forum: Fixing WordPress
In reply to: Issue regarding plugin instalationJust another thought. The timeout values in the WordPress PHP code should be OK if the network connection works well, and particularly the DNS name resolution. It would be more advisable to find the network bottleneck that is causing the delays rather then hacking the PHP code.
In my case, I found that the Virtualbox DNS resolution was slow (I was running an Ubuntu development server for WordPress in Virtualbox). After changing the guest OS’s /etc/resolv.conf to external DNS servers, the lags disappeared and the timeouts no longer occurred.Forum: Fixing WordPress
In reply to: Issue regarding plugin instalationBeside the maximum execution time, there are other timeouts imposed in WordPress code. If you are comfortable with changing WordPress PHP files, then you can eliminate this problem by changing the timeout value in line 279 of wp-includes\update.php from 3 to 10 or so.
was:$timeout = 3 + (int) ( count( $plugins ) / 10 );
should be:$timeout = 10 + (int) ( count( $plugins ) / 10 );You can anticipate encountering other similar errors due to timeouts. This is a list of low timeout values that I found in the code so far:
wp-includes/update.php (112)
wp-admin/includes/update.php (110)
wp-admin/includes/translation-install.php (44)Forum: Fixing WordPress
In reply to: Unable to post & Unable to update WordPressI think your errors can be attributed to a slower then usual network connection at your work site. There are timeout values specified in various PHP files, which are too low. I also run into this recently and managed to resolve it by increasing the timeout values that affected my installation. I also was running WordPress in a virtualized development environment behind firewalls and perhaps the connection has some lags.
I checked the place where you are getting the error and I recommend changing this line in wp-includes/update.php (112):
‘timeout’ => ( ( defined(‘DOING_CRON’) && DOING_CRON ) ? 30 : 3 ),
to this:
‘timeout’ => ( ( defined(‘DOING_CRON’) && DOING_CRON ) ? 30 : 10 ),There are also other places in wp-includes/update.php (279), wp-admin/includes/update.php (110), wp-admin/includes/translation-install.php (44) where the timeout value of 3 must be increased to 10 or a value that suits your installation.
Unfortunately and naturally, this hack will be overwritten by a WordPress update, so keep notes of the places to change the values until the fix will be incorporated into the release by WordPress.