The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Edit script execute timeout

Discussion in 'General Discussion' started by schatzman, Jun 5, 2017.

  1. schatzman

    schatzman Member

    Joined:
    Apr 9, 2017
    Messages:
    22
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    europe
    cPanel Access Level:
    Website Owner
    hello,

    i have a store and i need to export product once a day using a script set in a corn job.

    the problem is the running time of the script is about 1.5 hours.
    im using ea, php-fpm and php7
    i edited request_terminate_timeout in php-fpm domain.com.conf to 6000s
    i added
    <IfModule proxy_fcgi_module>
    timeout 6000
    </IfModule>
    to a apache

    and using wget --timeout=6000
    to run it..

    my issue is, that i don't want to leave the setting of proxy_fcgi_module and request_terminate so high.. i dont mind to leave wget --timeout=6000
    is there is a way around it? is there a way that only certain scripts using cron will have such a long time and others no?

    thanks
    Matan
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You could use the Addon Domain option in cPanel to add a new addon domain name to the account (e.g. subdomain123.domain.tld), enable PHP-FPM for this addon domain name, customize it's PHP-FPM values, upload the script to the addon domain's document root, and then setup the cron job with "wget" command using the addon domain name.

    Thank you.
     
Loading...

Share This Page