Project

General

Profile

Restoring crashed Wt session process (libwtfcgi + shared-process oprtion)

Added by Alan Finley almost 10 years ago

In the Wt fcgi Server implementation there's such code:

void Server::handleSigChld()
{
    ...
    // shared process option

    static int childrenDied = 0;

    ++childrenDied;

    if (childrenDied < 5)
        spawnSharedProcess();
    else
        LOG_ERROR_S(&wt_, "sessions process restart limit (5) reached");

    ...
}

As I can understand, the managing process spawns a new worker process after it catches the SIGCHLD signal which means that the old process crashed.

But I don't get why it can spawn a new process 5 times only? What is the logic behind this decision?


Replies (2)

RE: Restoring crashed Wt session process (libwtfcgi + shared-process oprtion) - Added by Koen Deforche almost 10 years ago

Hey,

That's indeed something that should be a configuration option, but somehow we want to put a limit here as to avoid an infinite crash-spawn cycle.

The 5 was under the assumption that you would write bug-free applications (and we a bug-free library ;-) ).

But it's a small change to make this a configuration setting for fastcgi. Could you file a request?

Regards,

koen

RE: Restoring crashed Wt session process (libwtfcgi + shared-process oprtion) - Added by Alan Finley almost 10 years ago

Koen Deforche wrote:

But it's a small change to make this a configuration setting for fastcgi. Could you file a request?

I've filed a request and also added some ideas about crash counter: http://redmine.emweb.be/issues/3375

    (1-2/2)