Title: Timeout issue
Last modified: June 24, 2021

---

# Timeout issue

 *  Resolved [xhorax](https://wordpress.org/support/users/xhorax/)
 * (@xhorax)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/)
 * Hello,
    We have installed Smush on our Cpanel+CloudLinux+LiteSpeed and when we
   try to optimize images after around 15 seconds we get below error: === Skipped
   due to a timeout error. You can increase the request timeout to make sure Smush
   has enough time to process larger files. define(‘WP_SMUSH_API_TIMEOUT’, 150) 
   === Obviously we added the code snippet to our wp-config file but the 15 second
   remained unchanged and when we raise the time in the code it doesn’t make any
   difference to the 15 second default time out.
 * What we have done:
    1- Used all the solutions on wpmudev.com forums and other
   sources 2- Raised all configurations of PHP about time and size 3- Removed all
   resource restrictions of CloudLinux 4- Raised all configurations of LiteSpeed
   about time 5- Used different methods of adding “define(‘WP_SMUSH_API_TIMEOUT’,
   150)” 6- Installed Smush on fresh installation of WordPress 7- Tried Smush on
   fresh installation of WordPress in another Cpanel 8- Checked “curl -I [https://smushpro.wpmudev.org/1.0&#8221](https://smushpro.wpmudev.org/1.0&#8221);
   which was okay 9- Checked all of Smush’s IPs which were okay 10- Checked if there
   was any error about the plugin in error_logs which wasn’t any
 * Now we are at loss here. What keeps breaking the process of optimization? And
   more importantly why the 15 second timeout isn’t changing at all.
 * Is there a way to change the hard coded 15 second?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftimeout-issue-7%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Support [Nithin – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport11/)
 * (@wpmudevsupport11)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14591428)
 * Hi [@xhorax](https://wordpress.org/support/users/xhorax/),
 * Unfortunately, it seems like there was a recent change to the definition which
   wasn’t reflected in the error message.
 * The define should be:
    WP_SMUSH_TIMEOUT
 * ie:
    `define('WP_SMUSH_TIMEOUT', 150);`
 * Could you please try the above and then check whether it works fine? I have already
   brought this to our team’s attention to correct this asap.
 * Sorry for any inconvenience due to this.
 * Kind Regards,
    Nithin
 *  Thread Starter [xhorax](https://wordpress.org/support/users/xhorax/)
 * (@xhorax)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14594369)
 * Hello,
    We tried the new definition but the 15 second time out persists. Is there
   a way to change it directly in the code and not by using code snippets?
 *  Plugin Support [Nithin – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport11/)
 * (@wpmudevsupport11)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14595686)
 * Hi [@xhorax](https://wordpress.org/support/users/xhorax/),
 * Could you please try a larger value? ie for example:
 *     ```
       define('WP_SMUSH_TIMEOUT', 600);
       ```
   
 * It seems like 150 is the default timeout set out of the box. Editing the plugin
   code directly isn’t the recommended practice and cannot say whether it would 
   crop any other issues.
 * Could we also know what’s the max_execution_time value set for your server? If
   it’s low, maybe you could try a value of 300 and see whether that makes any difference?
 * Please check the following for more info:
    [https://www.simplified.guide/php/increase-max-execution-time](https://www.simplified.guide/php/increase-max-execution-time)
 * Please do let us know how that goes, so that we could check further if needed.
 * Kind Regards,
    Nithin
 *  Thread Starter [xhorax](https://wordpress.org/support/users/xhorax/)
 * (@xhorax)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14595709)
 * Hello,
    We raised the Smush Timeout up to 800 and then 8000 but the initial 15
   second time out won’t change.
 * Also one of the first steps we made when facing this time out issue was increasing
   max_execution_time. It’s now 3000.
 * Something is interfering with the process of increasing timeout.
 *  Thread Starter [xhorax](https://wordpress.org/support/users/xhorax/)
 * (@xhorax)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14607737)
 * Hi,
 * Do you have any update about this issue? If there is any need we can purchase
   pro version.
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14622185)
 * Hello [@xhorax](https://wordpress.org/support/users/xhorax/) ,
 * I’m sorry about the delay. There is no need to buy the pro version.
 * Have you tried enabling debug mode in WordPress? Maybe there will be an error
   that would point us in the right direction why the define is not working.
 * To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);.
   Change it to:
 * `define('WP_DEBUG', true);`
 * In order to enable the error logging to a file on the server you need to add 
   yet one more similar line:
 * `define( 'WP_DEBUG_LOG', true );`
 * In this case, the errors will be saved to a debug.log log file inside the /wp-
   content/directory.
 * Depending on whether you want your errors to be only logged or also displayed
   on the screen you should also have this line there, immediately after the line
   mentioned above:
 * `define( 'WP_DEBUG_DISPLAY', false );`
 * The wp-config.php is located in your WordPress root directory. It’s the same 
   file where the database configuration settings are. You will have to access it
   by FTP or SFTP in order to edit it.
 * If you open wp-config.php and that define statement is not there, you can add
   it right before this line:
 * `/* That's all, stop editing! Happy blogging. */`
 * The wp-config.php is located in your WordPress root directory. It’s the same 
   file where the database configuration settings are. You will have to access it
   by FTP or SFTP in order to edit it.
 * I would need then to see **content of the debug.log file** – so please **upload
   it to service like a Dropbox and paste link here**
 * kind regards,
    Kasia
 *  Thread Starter [xhorax](https://wordpress.org/support/users/xhorax/)
 * (@xhorax)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14622805)
 * Hello,
    We enabled both WP_DEBUG_LOG and WP_DEBUG but the plugin doesn’t generate
   any extra error in console, web page or in debug.log.
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14623320)
 * Hi [@xhorax](https://wordpress.org/support/users/xhorax/)
 * Could you please send me an email to [contact@wpmudev.org](https://wordpress.org/support/topic/timeout-issue-7/contact@wpmudev.org?output_format=md)
   using this template:
 * > Subject: “Attn: Patrick Freitas”
   > Message: link back to this thread for reference: [https://wordpress.org/support/topic/timeout-issue-7/](https://wordpress.org/support/topic/timeout-issue-7/)
 * Best Regards
    Patrick Freitas

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Timeout issue’ is closed to new replies.

 * ![](https://ps.w.org/wp-smushit/assets/icon-256x256.gif?rev=3447113)
 * [Smush – Image Optimization, Compression, Lazy Load, WebP & CDN](https://wordpress.org/plugins/wp-smushit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-smushit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-smushit/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-smushit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-smushit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-smushit/reviews/)

## Tags

 * [timeout](https://wordpress.org/support/topic-tag/timeout/)

 * 8 replies
 * 4 participants
 * Last reply from: [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/timeout-issue-7/#post-14623320)
 * Status: resolved