Livecode server, timeout and processes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Livecode server, timeout and processes

Mark Wieder via use-livecode
Hello forum

A few days ago I ran into a severe problem with livecode server.
A subtil and unexpected change in the way one of my clients inputs
data via his app caused an endless loop to appear in one of the LC
scripts on the server, which lead to a 504 Gateway Timeout error.
As this script is called during a login procedure, it triggered
pretty quickly a kind of chain reaction with many side effects :
- many 504 Gateway Timeout errors in browsers
- many 500 Internal server errors
- huge slow down of the server
- emails not sent/nor received in webmails
- several other services unavailable due to server slowdown...

All these problems were caused by the accumulation of livecode
server processes on the server that kept running even if timeout
errors were issued.
As the source of the problem took a few hours to track down and
to fix, we (on-rev support and I) had to kill dozens of processes
manually to avoid any server crash.

I know this might sound amateuristic to most of you, but nevertheless
I was wondering if there is any way to prevent something like that,
like for instance having all timedout processes to be killed
automatically, or even better : avoiding any endless loop in the first
place...

Thanks in advance.
jbv



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Livecode server, timeout and processes

Mark Wieder via use-livecode
jbv wrote:

 > A few days ago I ran into a severe problem with livecode server.
 > A subtil and unexpected change in the way one of my clients inputs
 > data via his app caused an endless loop to appear in one of the LC
 > scripts on the server, which lead to a 504 Gateway Timeout error.
 > As this script is called during a login procedure, it triggered
 > pretty quickly a kind of chain reaction with many side effects :
 > - many 504 Gateway Timeout errors in browsers
 > - many 500 Internal server errors
 > - huge slow down of the server
 > - emails not sent/nor received in webmails
 > - several other services unavailable due to server slowdown...
 >
 > All these problems were caused by the accumulation of livecode
 > server processes on the server that kept running even if timeout
 > errors were issued.
 > As the source of the problem took a few hours to track down and
 > to fix, we (on-rev support and I) had to kill dozens of processes
 > manually to avoid any server crash.
 >
 > I know this might sound amateuristic to most of you, but nevertheless
 > I was wondering if there is any way to prevent something like that,
 > like for instance having all timedout processes to be killed
 > automatically, or even better : avoiding any endless loop in the first
 > place...

Without seeing the code it won't be possible to offer suggestions on
prevention.

As for remedies, SSH is a must for server management.  I believe on-rev
offers SSH access on request. Once you have direct access to the machine
you can monitor processes and kill any errant ones.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...