• Resolved xhorax

    (@xhorax)


    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” 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 to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @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

    (@xhorax)

    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

    (@wpmudevsupport11)

    Hi @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

    Please do let us know how that goes, so that we could check further if needed.

    Kind Regards,
    Nithin

    Thread Starter xhorax

    (@xhorax)

    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

    (@xhorax)

    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

    (@wpmudev-support2)

    Hello @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

    (@xhorax)

    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

    (@wpmudevsupport12)

    Hi @xhorax

    Could you please send me an email to contact@wpmudev.org using this template:

    Subject: “Attn: Patrick Freitas”

    Message: link back to this thread for reference: 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.