-
-
Notifications
You must be signed in to change notification settings - Fork 737
Description
Describe the bug
When calling fetchmessages.php (the livechat embed calls this), the application throws an 503 error. This only happens when there is some traffic and the page with the livechat embedding has been idle for a while (about 20/30 mins). Out livechat embed first shows a form the user must fill. After submitting the form, the livechat embed shows an empty page and is unresponsive. The logs show the following exception:
[15-Dec-2025 08:28:29 Europe/Amsterdam] PDOException: There is no active transaction in /code/ezcomponents/Database/src/handler.php:222
Stack trace:
#0 /code/ezcomponents/Database/src/handler.php(222): PDO->rollBack()
#1 /code/cache/compiledtemplates/2f87123ff498d5b69abd5362d9e12967.php(2): ezcDbHandler->rollback()
#2 /code/lib/core/lhcore/lhmodule.php(116): include('/code/cache/com...')
#3 /code/lib/core/lhcore/lhmodule.php(678): erLhcoreClassModule::runModule()
#4 /code/index.php(48): erLhcoreClassModule::moduleInit()
#5 {main}
This exception isn't even logged in the application, only in the php error log. This is because the exception is caused by $db->commit on line 274 in /modules/lhwidgetrestapi/fetchmessages.php and caught on line 276, which tries a $db->rollback on line 277. That fails, because there is no transaction and the error write action on line 280 isn't called.
Have you tried to reproduce on official demo? We can't help if we can't reproduce...
No, can't generate enough traffic there.
Have you tried to debug and get debug information?
https://doc.livehelperchat.com/docs/debug
To Reproduce
Steps to reproduce the behavior:
- Add a live help widget to a page with following settings:
- enable fresh start
- enable show leave message form
- set widget mode to embed
-
Embed the generated code on a page
-
Enable a start chat form with a number of required questions
-
Generate some traffic to the chat server (multiple operators logged in, multiple visitors, etc)
-
Now open the page with the embedded live help. The form will show on the embedded chat.
-
Wait about 20 mins, while traffic is still happening
-
Submit the embedded form. The embedded chat will show nothing but a text box where you can't interact with. The error log will show the "No active transactions" error.
Expected behavior
Chats should work after submitting the form, even if the page has been idle for 20 mins. The exception "No active transactions" should not be thrown.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS] MacOS, ChromeOS, Windows
- Browser [e.g. chrome, safari]: Chrome, Firefox
- Version [e.g. 22]
Additional context
Add any other context about the problem here.