WebSocketBundle icon indicating copy to clipboard operation
WebSocketBundle copied to clipboard

Websocket flooding database : PDO // ERROR

Open ma-gu-16 opened this issue 2 years ago • 1 comments

Hi there,

i received the following Error:

request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[70100]: <<Unknown error>>: 1907 Query execution was interrupted, query_timeout exceeded" at /var/www/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php line 337 {"exception":"[object] (PDOException(code: 70100): SQLSTATE[70100]: <<Unknown error>>: 1907 Query execution was interrupted, query_timeout exceeded at /var/www/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php:337)"}

i already increased the timeout, but seems like this is not the problem. as i figured out my database entries getting bigger and bigger. i safe the symfony user sessions in there.

since i use the authentificated websocket user, i have this problems.

sometimes the the websocket connections doesnt work at first try, because it took to long time i guess to find the right session.

atm the symfony user session db has 1333 entries. i guess thats way to much. should someone remove this entries by time? i think the websocket makes everytime a new session.

i hope i explained enough and someone can help me.

services.yaml:


  Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler:
    arguments:
      - '%env(DATABASE_URL)%'
      - { db_table: 'symfony_user_session', lock_mode: 0 }

thank you

ma-gu-16 avatar Oct 28 '21 10:10 ma-gu-16

What’s the full stack trace on this error? The fact it is logged on the “request” channel makes me think that the error isn’t even coming from the websocket server (I can’t think of too many services off the top of my head that have the “request” channel logger AND get used in the context of a console command).

The websocket system does not write any session data, it is a 100% read-only interface.

mbabker avatar Oct 28 '21 12:10 mbabker