Closed mikedov closed 5 months ago
There only way to figure out what is going on is to investigate it on your server. What we can recommend is to check your Worlkflows, maybe deleting conversations triggers some workflows.
We have 2 workflows on that mailbox. They are both automatic, and both have max executions set to 1. The condition for one is 10 Tag is equal to ORs, and the action is add a note and add tag and move to mailbox. The other's condition is 1 Tag is equal to with an action of adding a tag.
I wouldn't think they would be slowing anything down, because with the max executions of 1, it would just run once when the thread is created. Maybe I'm not understanding fully what each option does.
Is the 10 tag ors causing the performance issues? I'm able to offload that workflow onto another system and add the tag through the API.
I recorded the SQL queries that went on during a close. There are multiple users active on the system, so I'm sorry about the interference.
I used SET GLOBAL general_log = 'ON'
in the DB right before I closed a ticket, and when the ticket was done (the loading spinner stopped and I got redirected back to the folder) I ended the logging.
I also tallied up most of the queries to see at a glance which queries ran the most in that 10 seconds it took to close the ticket.
I don't know how to check how long each of these queries took. If you know a way, I'll try that out and get back to you with it.
The file for the sql log is too long to post in this comment. I'll add it in another.
I am the only user using Freescout right now. These queries all ran during the 10sec it took to close the thread.
Unfortunately there is no way to figure out your issue just by reading SQL-queries. You may need to find someone who can check it on your server.
Freescout slows down to an (almost) halt, with page load times upwards of 15-60sec during bulk thread closing. This is on a mailbox without any email connection. No receiving or sending email is configured. Threads are created through the API, with the email always being newlead@example.com. The threads are all auto-tagged through the API right after creation as well, and we manually create a custom folder for the new tag when we see it.
When we have a lot of threads opened by mistake, we need to close them out to not clutter the mailbox. We will typically search by tag or subject, and select all with the checkboxes, and set them to closed. This results in full CPU usage for 10-30min. It looked like most of the CPU usage was from the database, and some of the time from PHP.
Yesterday during a bulk close we got this error 75 times in the logs, all with the same timestamp. I don't know if it's related or not.
This is the docker compose file we use:
PHP version: PHP 8.2.17 FreeScout version: 1.8.127 Database: Mysql (10.6.7-MariaDB) Are you using CloudFlare: No
Modules installed: API and Webhooks Custom Folders Custom Mailbox Signatures Customization & Rebranding Dark Mode Extended Attachments Extended Editor Faster Search Followers Global Mailbox Inbox (Inactive) Mentions Saved Replies Send & Close Send Later Sent Folder Snooze Sticky Notes Tags Teams Widgets White-Labeling Workflows