Announcement

Collapse
No announcement yet.

lsapi_backend_max_process_time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lsapi_backend_max_process_time

    I have some scrips that take a while to run so I had to incrase lsapi_backend_max_process_time from 300. 99.99% of the time I would like the value to be at 300. But for those few times it needs to be longer, is there some way for my php script to communicate back to lsapi that it is still working and needs more time? I tried echoing something at regular intervals to no avail.

    Also, the way the this timeout works, it just kills the php process dead in its tracks without allowing it to run any registered shutdown functions. Optimally Id like there to be two timeouts, 1) that sends a messages to php telling it to die after X seconds, but still allows it to run cleanup functions. Then 2) one that functions like the lsapi_backend_max_process_time where it would total kill the php process immediately after X seconds.

    Sidenote: the docs say the default value for lsapi_backend_max_process_time is 3600 when it is actually 300.

  • #2
    Hello,

    I have just clarified things with our developers and have to say that it is not possible to configure it like you want. Something like that doesnt exists.

    There is a workardound for it, not elegant but one that will do a trick:

    1. Set lsapi_backend_max_process_time 3600 in lsapi.conf file

    2. Create .htaccess for each domain and set php_value max_execution_time 30 in it

    3. When needed - increase max_execution_time for up to 3600 with .htaccess or with ini_set inside PHP script itself.

    But yes, your users will be able to change it same way like you.

    Comment


    • #3
      And, thanks for sidenote, going to update our documentation soon.

      Comment


      • #4
        We also have some issues with lsapi_backend_max_process_time.
        I see the documentation is 300 now. Is that correct?
        Its not possible to change this for just one account/domain somehow?

        Comment


        • #5
          Hello,

          Correct, the default value is 300.
          Unfortunately, no. lsapi_backend_max_process_time value can be set only globally.

          Comment


          • #6
            Has their been any change with how this variable works? I have the following in /etc/apache2/conf.d/lsapi.conf

            Code:
            lsapi_backend_max_process_time 28800
            However it looks i get the like the 503 Service Unavailable error after 10 minutes (which is strange because I thought it would have defaulted to 300 seconds or 5 minutes).

            Edit: it does happen after 5 minutes

            Comment


            • #7
              Also, to test, I created a script that would run for a long time. I got the 503 error after 5 minutes, but it seemed like the script continued to run because I received LVE faults for several hours afterword. I manually killed the script myself so Im not sure if it would have been killed by lsapi after my set value or if php would have continued to run "forever" (or until it hit the php time limit or some other php initiated kill.

              So is the point of this just to manage possible runaway processes on lsapi and has nothing to do with how php behaves?

              Comment


              • #8
                Hello,

                As far as I know, there were no changes in "lsapi_backend_max_process_time" behaviour.
                Please submit a ticket to https://cloudlinux.zendesk.com, our techs will check the issue in place.

                Comment


                • #9
                  I looks like what happened was the

                  Code:
                  lsapi_poll_timeout
                  variable recently had its default changed from 0 to 300 seconds. So it used to be infinite. Making it the same value as

                  Code:
                  lsapi_backend_max_process_time
                  has fixed the issue.

                  The CL developers are still looking into whether it functions correctly. I also asked what the reason both settings are necessary because it seems like they do the same thing (at least to my limited understanding).

                  Comment

                  Working...
                  X