Jump to content

Recommended Posts

Posted
25 minutes ago, talesaz said:

However, could you please check what happened at this timestamp?

Still the same thing

[Wed Apr 16 16:12:21.564404 2025] [wsgi:error] [pid 3963178:tid 3963190] [remote x.x.x.x:47984]     raise OperationalError("MySQL Connection not available.")

I have a connection monitoring script running. Try to trigger the error, or give me a URL I can refresh to see if I can cause the error to happen.

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I applied the following configuration in SQLAlchemy, and it improved performance significantly.

SQLALCHEMY_ENGINE_OPTIONS = {'pool_size': 5, 'max_overflow': 5, 'pool_timeout': 30, 'pool_recycle': 280, 'connect_args': {'connect_timeout': 30}}

 

However, what I find strange is that, from time to time, accessing any page results in a 502 error—even when it's just an HTML page with JavaScript. It feels as though the server is crashing.
 

2025-04-19 22:21:31    Access    186.205.7.186    200    GET /oeto/flask.wsgi/conteudo/cadastrar HTTP/1.0    https://thelema93.com.br/oeto/flask.wsgi/conteudo    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36    15.0 K    Apache SSL/TLS access
2025-04-19 22:21:31    Access    186.205.7.186    304    GET /oeto/flask.wsgi/static/logo.png HTTP/1.0    https://thelema93.com.br/oeto/flask.wsgi/conteudo/cadastrar    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36    769    Apache SSL/TLS access
2025-04-19 22:22:17    Error    186.205.7.186        2814338#0: *2069943 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:21    Error    186.205.7.186        2814338#0: *2069943 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:24    Error    186.205.7.186        2814338#0: *2069943 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:27    Error    186.205.7.186        2814338#0: *2069943 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:29    Error    186.205.7.186        2814338#0: *2069943 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:41    Error    34.243.176.77        2814338#0: *2077939 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:41    Error    34.243.176.77        2814338#0: *2077939 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:42    Error    34.245.72.225        2814338#0: *2077992 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:43    Error    34.245.72.225        2814338#0: *2077992 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:22:59    Error    186.205.7.186        2814338#0: *2078353 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:23:02    Error    186.205.7.186        2814338#0: *2078353 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:23:04    Error    186.205.7.186        2814338#0: *2078353 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:23:06    Error    186.205.7.186        2814338#0: *2078353 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:23:13    Error    186.205.7.186        2814338#0: *2078353 connect() failed (111: Connection refused) while connecting to upstream                nginx error
2025-04-19 22:23:15    Error    186.205.7.186        2814338#0: *2078353 connect() failed (111: Connection refused) while connecting to upstream                nginx error

 

Posted
2 hours ago, talesaz said:

accessing any page results in a 502 error—even when it's just an HTML page with JavaScript. It feels as though the server is crashing.

If 99.47% uptime isn't good enough you can always upgrade to Morty which has 100% uptime at https://heliohost.org/dashboard/move/ If you are planning on moving over you can let us know what Python modules you need in advance since they don't move with you.

Posted
1 hour ago, Krydos said:

If 99.47% uptime isn't good enough you can always upgrade to Morty which has 100% uptime at https://heliohost.org/dashboard/move/ If you are planning on moving over you can let us know what Python modules you need in advance since they don't move with you.

I requested the change to Morty with the same libraries from the Tommy server, such as:

  • Flask 3.0.3

  • Flask-Cors 5.0.0

  • Flask-Login 0.6.3

  • Flask-Restx 1.3.0

  • Flask-SocketIO 5.4.1

  • Flask-SQLAlchemy 3.1.1

  • Flask-WTF 1.2.1

  • MySQL-Connector 2.2.9

  • MySQL-Connector-Python 9.2.0

  • MySQLClient 2.2.4

And others listed here:https://krydos1.heliohost.org/pyinfo/info3.12.py. They all work fine for me.

  • wolstech changed the title to [Krydos] Python + Flask - 500 Internal Server Error
Posted

I received an email confirming that the account move has been completed, but now the websites are showing errors.

2025-04-20 03:52:58    Error    186.205.7.186        No WSGI daemon process called 'talesaz1_wsgi' has been configured: /home/talesaz.heliohost.us/thelema93.com.br/oeto/flask.wsgi                Apache error
2025-04-20 03:53:11    Error    186.205.7.186    500    GET /bma/ HTTP/1.0    https://arniskali.com/    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36    1.22 K    Apache SSL/TLS access
2025-04-20 03:53:11    Error    186.205.7.186        No WSGI daemon process called 'talesaz_1_wsgi' has been configured: /home/talesaz.heliohost.us/arniskali.com/bma/flask.wsgi, referer: https://arniskali.com/                Apache error

 

Posted
33 minutes ago, Krydos said:

I just re-enabled the WSGI access and it should go into effect after the next Apache restart.

Am I able to edit the flask.wsgi file to refresh the WSGI after an update?

Posted
2025-04-20 13:07:14    Error    186.205.7.186    500    GET /oeto/ HTTP/1.0        Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36    1.22 K    Apache SSL/TLS access
2025-04-20 13:07:14    Error    186.205.7.186        No WSGI daemon process called 'talesaz1_wsgi' has been configured: /home/talesaz.heliohost.us/thelema93.com.br/oeto/flask.wsgi                Apache error
2025-04-20 13:07:15    Error    186.205.7.186    404    GET /favicon.ico HTTP/1.0    https://thelema93.com.br/oeto/    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36    910    Apache SSL/TLS access

The Apache server restarts every 2 hours, right? Because I’m experiencing the same problem.

Posted

Even when attempting to connect directly to the database, I keep encountering an "access denied" error. To be thorough, I changed the password and ensured that access from any host was allowed, but the same error persists. I also tried creating a new database as a test, yet it still shows the same connection error.

Posted

Did you update your remote database clients to use morty.heliohost.org as the host name? If you're still pointing the clients to Tommy, you'll experience this exact issue. You may also want to try turning the remote access off and on again for the database user.

As for the Python issues, I have no idea on that one. The error makes me think something related to WSGI may have broken during the move. Krydos would need to figure that out.

As a reminder, it is Easter today, so support is limited. It is possible you won't receive a response until tomorrow regarding these issues due to the holiday.

Posted
13 hours ago, talesaz said:
No WSGI daemon process called 'talesaz1_wsgi' has been configured: /home/talesaz.heliohost.us/thelema93.com.br/oeto/flask.wsgi

I'm confused. You requested and I enabled WSGI restart access on talesaz.heliohost.us.

On 4/15/2025 at 3:16 PM, Krydos said:

WSGI control access has been enabled on the domain talesaz.heliohost.us.

But now you're posting logs from a different domain. Which domain are you trying to run Flask on?

Posted

I apologize for forgetting that today is not only Sunday but also Easter Sunday (by the way, Happy Easter!).

 

I performed a step-by-step troubleshooting of the code and believe I’ve identified the issue: the absence of the flask-login library. Would it be possible to install this library on the Morty server?

Posted
28 minutes ago, talesaz said:

the absence of the flask-login library. Would it be possible to install this library on the Morty server?

Installed. You can see the current list of installed modules for Morty's Python 3.12 at https://krydos3.heliohost.org/pyinfo/info3.12.py

28 minutes ago, talesaz said:

I performed a step-by-step troubleshooting of the code

Keep in mind that you don't have WSGI restart access on any of your domains right now, so after you change code you may see the old code and the old errors popping up again. If you want WSGI access again just let us know which domain you're using now.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...