Forums

Don't understand this server log error.

The page sometimes loads sometimes doesn't (it only keeps loading) and the server log shows this. I also have a paid account under which I've never experienced this error. Any help is appreciated.

Thank you!

2020-10-20 17:00:46 *** Starting uWSGI 2.0.17.1 (64bit) on [Tue Oct 20 16:55:49 2020] ***
2020-10-20 17:00:46 compiled with version: 5.4.0 20160609 on 07 May 2020 19:40:56
2020-10-20 17:00:48 os: Linux-5.4.0-1020-aws #20-Ubuntu SMP Fri Jul 10 05:52:40 UTC 2020
2020-10-20 17:00:48 nodename: blue-liveweb10
2020-10-20 17:00:48 machine: x86_64
2020-10-20 17:00:48 clock source: unix
2020-10-20 17:00:48 pcre jit disabled
2020-10-20 17:00:48 detected number of CPU cores: 2
2020-10-20 17:00:48 current working directory: (unreachable)/etc/uwsgi/vassals
2020-10-20 17:00:48 detected binary path: /usr/local/bin/uwsgi
2020-10-20 17:00:48 *** dumping internal routing table ***
2020-10-20 17:00:48 [rule: 0] subject: path_info regexp: \.svgz$ action: addheader:Content-Encoding:gzip
2020-10-20 17:00:48 [rule: 1] subject: path_info regexp: /.well-known/acme-challenge/ action: continue:
2020-10-20 17:00:48 [rule: 2] subject: path_info regexp: ^/ action: basicauth:Default Realm,jandavid:svendalojkasek2020
2020-10-20 17:00:48 *** end of the internal routing table ***
2020-10-20 17:00:48 chdir() to /home/davelojk/
2020-10-20 17:00:48 limiting number of processes to 60...
2020-10-20 17:00:48 your processes number limit is 60
2020-10-20 17:00:48 your memory page size is 4096 bytes
2020-10-20 17:00:48 detected max file descriptor number: 123456
2020-10-20 17:00:48 building mime-types dictionary from file /etc/mime.types...
2020-10-20 17:00:48 552 entry found
2020-10-20 17:00:48 lock engine: pthread robust mutexes
2020-10-20 17:00:48 thunder lock: disabled (you can enable it with --thunder-lock)
2020-10-20 17:00:48 uwsgi socket 0 bound to UNIX address /var/sockets/davelojk.pythonanywhere.com/socket fd 3
2020-10-20 17:00:48 Python version: 3.8.0 (default, Nov 14 2019, 22:29:45)  [GCC 5.4.0 20160609]
2020-10-20 17:00:48 *** Python threads support is disabled. You can enable it with --enable-threads ***
2020-10-20 17:00:48 Python main interpreter initialized at 0x1855630
2020-10-20 17:00:48 your server socket listen backlog is limited to 100 connections
2020-10-20 17:00:48 your mercy for graceful operations on workers is 60 seconds
2020-10-20 17:00:48 setting request body buffering size to 65536 bytes
2020-10-20 17:00:48 mapped 334256 bytes (326 KB) for 1 cores
2020-10-20 17:00:48 *** Operational MODE: single process ***
2020-10-20 17:00:48 initialized 38 metrics
2020-10-20 17:00:48 /usr/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py:834: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.#012  warnings.warn(FSADeprecationWarning(
2020-10-20 17:00:48 /usr/lib/python3.8/site-packages/pandas/core/frame.py:4238: SettingWithCopyWarning:#012#012#012A value is trying to be set on a copy of a slice from a DataFrame#012#012See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
2020-10-20 17:00:48 #015[*********************100%***********************]  1 of 1 completed
2020-10-20 17:00:48 
2020-10-20 17:00:48 WSGI app 0 (mountpoint='') ready in 297 seconds on interpreter 0x1855630 pid: 1 (default app)
2020-10-20 17:00:48 *** uWSGI is running in multiple interpreter mode ***
2020-10-20 17:00:48 gracefully (RE)spawned uWSGI master process (pid: 1)
2020-10-20 17:00:48 spawned uWSGI worker 1 (pid: 447, cores: 1)
2020-10-20 17:00:48 metrics collector thread started
2020-10-20 17:00:48 spawned 2 offload threads for uWSGI worker 1
2020-10-20 17:00:48 Tue Oct 20 17:00:46 2020 - received message 0 from emperor
2020-10-20 17:00:48 SIGINT/SIGQUIT received...killing workers...
2020-10-20 17:00:48 uwsgi_master_manage_emperor()/read(): Bad file descriptor [core/emperor.c line 2431]
2020-10-20 17:00:48 lost connection with my emperor !!!
2020-10-20 17:00:48 Traceback (most recent call last):
2020-10-20 17:00:48   File "/usr/lib/python3.8/random.py", line 123, in seed
2020-10-20 17:00:48     def seed(self, a=None, version=2):
2020-10-20 17:00:48 KeyboardInterrupt
2020-10-20 17:00:48 Tue Oct 20 17:00:46 2020 - SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) !!!
2020-10-20 17:00:48 emperor-i-am-ready-to-accept/write(): Broken pipe [core/uwsgi.c line 3579]
2020-10-20 17:00:48 Tue Oct 20 17:00:46 2020 - lost communication with the Emperor, goodbye...
2020-10-20 17:00:48 Tue Oct 20 17:00:46 2020 - graceful shutdown triggered...
2020-10-20 17:00:48 Gracefully killing worker 1 (pid: 447)...
2020-10-20 17:00:48 chdir(): No such file or directory [core/uwsgi.c line 1610]
2020-10-20 17:00:48 VACUUM WARNING: unix socket /var/sockets/davelojk.pythonanywhere.com/socket changed inode. Skip removal

have you checked your error log? (not your server log)

-

I have and didn't get any errors there. That's why I was confused. However, what seem to have been the problem is that I reloaded the website in my browser to quickly after clicking the green reload button on the web configuration page. Giving it a few seconds seems to have helped.

The most recent error we see for your webapp is 2020-10-21 06:28:27,992. Are you sure you have looked at the most recent error (at the bottom of your error log?)

Yes, I did. It worked fine in between. It worked fine the whole day today but I started getting the same error a couple of minutes ago again.

I forgot to mention that I indeed did correct the error first, then it worked fine. I made a change to the code, reloaded the webpage and started to get these server errors.

I'm experiencing the same thing today. I know there is no error in my code as every now and then, the webpage loads just fine and I can work in the app. But then I reload it and start getting these server problems.

It looks like you may have some sort of long-running thing in your app that runs at import time (I'm guessing it's the thing that writes [*********************100%***********************] 1 of 1 completed to the server log). Sometimes that takes a long time so your web app is not ready in time and the system thinks it's crashed, so it tries to restart your web app. Sometimes it may run in a shorter amount of time so your web app then works until you restart it.

Okay, that seems to be the issue. When waited a couple of seconds before reloading the webpage again, it worked fine.

Alright, thank you!

Glad to hear that you sorted it out!