logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to ensure CGI scripts can die gracefully in Server 2016
Author
RayNMS



Joined: 31 Jul 2019
Posts: 1

PostPosted: Wed 31 Jul '19 17:59    Post subject: How to ensure CGI scripts can die gracefully in Server 2016 Reply with quote

We've been running Apache 2.4 on Windows Server for many years. Thanks.

Current version us 2.4.37 from Apache Lounge. Likewise all modules. Windows Server 2016 fully patched

We've always had the odd case where CGI scripts died (mainly due to illegal memory access presumably due to outdated pointers) and which then left a console message "illegal memory access... Press any key to continue"

Most scripts are running under mod_perl2.

Other users then get a 500 error.

We've got a watchdog process that regularly polls the server, checking it's still alive. If there's no response it restarts the Windows service. It's no big deal to restart the service.

Under Server 2016 we're now seeing CGI scripts failing more often, and users getting a 500 message, but funnily enough the watchdog continues running fine. We know it's not caching as it echos a timestamp and a pseudorandom transaction ID.

Some questions:
1) Does anyone know how to configure Server 2016 to let processes die gracefully without waiting for any user input. I've seen registry suggestions but nothing I've tried works.

Also Server 2016 has no console....

2) has the threading model changed?

Is it possible for some server threads to hang, whilst our watchdog merrily continues working indefinitely?

If so we may have to provide an echo action in each script, and vary the target of the watchdog.

3) any suggestions for finding the root cause of the pointer problem?

It's almost certainly not in our own code, but if at least we could find the cause we might be able to provide a workaround.

Thanks!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Wed 21 Aug '19 10:31    Post subject: Reply with quote

You can't configure Windows for that. But you have to adjust Apache and or mod_perl2. I never use perl, so I can't help you with that, but it is now the Windows OS.
Back to top


Reply to topic   Topic: How to ensure CGI scripts can die gracefully in Server 2016 View previous topic :: View next topic
Post new topic   Forum Index -> Apache