drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.56k stars 1.11k forks source link

Loops other than event-loop thread- application locks up completely. #2178

Open RomanSpies opened 4 weeks ago

RomanSpies commented 4 weeks ago

Describe the bug The application locks up fully when "too much screen distance" is between DbClient + ORM Coro Mapper definition and location of usage.

If I define coro mappers, redis and db fast clients at the start of a code block (which executes if the client has successfully authenticated, there's no loops / if flows in that block anymore), the application locks up . not terminatable via CTRL-C and

20241003 20:00:57.504808 UTC 59703 FATAL It is forbidden to run loop on threads other than event-loop thread - EventLoop.cc:269

To Reproduce Steps to reproduce the behavior: File attached. Drogon 1.9.6-7 (occurs with both), trantor 1.5.20-21, spdlog on, clang 18.1.8, ubuntu 24.04 LTS server, postgres 16.4, dragonfly.

Expected behavior For the code to not care where I define my coro mappers and redis client as long as they are accessible.

ex.txt

GuidoHeintz commented 1 week ago

i got the same error, since some weeks - in v1.9.6 & v1.9.7 "FATAL It is forbidden to run loop on threads other than event-loop thread - EventLoop.cc:269"

v1.9.6 was running before i didn't analyzed it - so i have no more info

after the log i get a segmention fault

error happens on linux - OpenSuse Leap 15.5 its working on Windows 11

related to this issue from 2020: https://github.com/drogonframework/drogon/issues/489

GuidoHeintz commented 1 week ago

i forgot something -> additionally i get a segmention fault after this log entry

but yesterday i found a solution in my case -> maybe it helps anybody too after many try out and downgrade to really old versions i had no success

the solution was: i had ssl certificates configured, but there there was no files after copy the certificate files to the configured folders all is running perfectly like before

i upgrade to newest versions of ares and drogon again