WebFaction
Community site: login faq

I've had a Flask application served using Apache and mod_wsgi that has been running without issue for months. I haven't touched the Apache config since it launched, and I haven't touched the WSGI application in several weeks.

Two days ago, my application started going down regularly, every 1-2 hours. Specifically, it looks like the Apache parent process is dying/being killed silently.

  • No errors in the logs.
  • No unusual traffic, and indeed sometimes no traffic at all when it dies (I've sat and seen the process die when no requests have come in for some time).
  • I've turned on Apache's forensic logging, and there are no uncompleted requests.
  • I've tried setting strict timeouts and limits on the child processes (WSGIDaemonProcess <my_app> processes=5 threads=12 restart-interval=600 inactivity-timeout=60 request-timeout=30 maximum-requests=50), and they are being recycled correctly, but the parent process still dies.
  • I've tried changing the MaxRequestWorkers, ServerLimit, and ThreadsPerChild. Adding more ThreadsPerChild seems like it might extend the time before it dies, but that might've been a coincidence.
  • I've tested to make sure that any errors coming from my application are logged properly, and they are.
  • Neither the parent nor the child processes appear to be using high CPU or memory.
  • I've tried stress-testing my application, including creating a long-running test endpoint, in an attempt to reproduce the issue, but I've had no success; it still dies "on schedule"

I have no idea what could be causing this, especially since nothing has apparently changed from before, and at this point I don't even know what to try. Any suggestions would be appreciated.

asked 14 Oct, 10:57

JMG
112
accept rate: 0%


Other customers reported similar behavior from their python apps, so I don't think that this is something specific to yours.

Our system administrators are notified and they are looking into this issue.

permanent link

answered 14 Oct, 11:07

iliasr ♦♦
2.2k14
accept rate: 34%

I filed a ticket and was told this must be a problem with my app; has the official response now changed? How can I be kept up-to-date on the status of this issue?

(14 Oct, 13:06) JMG

Yep, I've seen this too, only for a Python app though and not on a separate Perl/PHP project. My Python app is suffering short (~10 mins) outages every few hours. I raised a ticket and it's being investigated.

permanent link

answered 14 Oct, 11:17

kieren
214
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×226
×63
×57

question asked: 14 Oct, 10:57

question was seen: 251 times

last updated: 14 Oct, 13:06

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM