Forums

Flask app is down without any reason

One of our Flask app is down for 10 hours now, and I don't have too much idea what can cause the problem. There is nothing in the error log and I didn't add any new code. It just stopped working and asking for user authentication. However the server log is full with these kind of messages:

2016-09-06 07:53:49 Python version: 3.4.3 (default, Oct 14 2015, 20:31:36)  [GCC 4.8.4]
2016-09-06 07:53:49 *** Python threads support is disabled. You can enable it with --enable-threads ***
2016-09-06 07:53:49 Python main interpreter initialized at 0x1417b40
2016-09-06 07:53:49 your server socket listen backlog is limited to 100 connections
2016-09-06 07:53:49 your mercy for graceful operations on workers is 60 seconds
2016-09-06 07:53:49 setting request body buffering size to 65536 bytes
2016-09-06 07:53:49 mapped 2671616 bytes (2609 KB) for 15 cores
2016-09-06 07:53:49 *** Operational MODE: preforking ***
2016-09-06 07:53:49 initialized 245 metrics
2016-09-06 07:53:49 WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1417b40 pid: 18144 (default app)
2016-09-06 07:53:49 *** uWSGI is running in multiple interpreter mode ***
2016-09-06 07:53:49 spawned uWSGI master process (pid: 18144)
2016-09-06 07:53:49 spawned uWSGI worker 1 (pid: 18146, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 1
2016-09-06 07:53:49 spawned uWSGI worker 2 (pid: 18149, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 2
2016-09-06 07:53:49 spawned uWSGI worker 3 (pid: 18152, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 3
2016-09-06 07:53:49 spawned uWSGI worker 4 (pid: 18155, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 4
2016-09-06 07:53:49 spawned uWSGI worker 5 (pid: 18158, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 5
2016-09-06 07:53:49 spawned uWSGI worker 6 (pid: 18161, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 6
2016-09-06 07:53:49 spawned uWSGI worker 7 (pid: 18164, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 7
2016-09-06 07:53:49 spawned uWSGI worker 8 (pid: 18167, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 8
2016-09-06 07:53:49 spawned uWSGI worker 9 (pid: 18170, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 9
2016-09-06 07:53:49 spawned uWSGI worker 10 (pid: 18173, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 10
2016-09-06 07:53:49 spawned uWSGI worker 11 (pid: 18176, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 11
2016-09-06 07:53:49 spawned uWSGI worker 12 (pid: 18179, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 12
2016-09-06 07:53:49 spawned uWSGI worker 13 (pid: 18182, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 13
2016-09-06 07:53:49 spawned uWSGI worker 14 (pid: 18185, cores: 1)
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 14
2016-09-06 07:53:49 spawned uWSGI worker 15 (pid: 18188, cores: 1)
2016-09-06 07:53:49 metrics collector thread started
2016-09-06 07:53:49 spawned 2 offload threads for uWSGI worker 15
2016-09-06 07:53:50 announcing my loyalty to the Emperor...
2016-09-06 07:53:55 announcing my loyalty to the Emperor...

Is it something that I can fix?

That message is what the system logs when the website starts up. I'm looking into what might be up with your app right now.

OK, I can see four sites associated with your account. I won't mention the full domains, just to protect your privacy, but using XXXX to mask bits out:

  • www.cXXXXXXX, which has password protection switched on so I can't view it. If this is the one you're concerned about, and you don't need the password protection, what you need to do is scroll to the bottom of the "Web" tab, switch it off, and reload the website.
  • www.aXXXXXX, which is running fine as far as I can tell.
  • www.sXXXXXe, which is just a simple "Hello from Flask" site.
  • www.sXXXXXt, which is also a simple "Hello from Flask" site.

If the problem isn't the first site, could you let me know which one it is?

Thank you Giles!

The first one was it and now it's fixed and works perfectly. However I can't believe how could I accidentally set it to password protected. I don't remember doing anything like this yesterday and didn't want to turn off the site anyway. Maybe I clicked on it somehow. Such an awkward mistake from me. Thanks Giles for the help!

Glad I could help!

One possibility is that you accidentally switched it on a while back, but didn't reload it. The setting only take effect after a reload, so it could have been on for a while, and then suddenly unexpectedly kicked in after you reloaded it for a different reason.

I've reloaded it yesterday so that must be the reason.

Makes sense.