add timeout to prevent freescout from freezing when endpoint is not reachable - #20
add timeout to prevent freescout from freezing when endpoint is not reachable#20w-paheg wants to merge 1 commit into
Conversation
|
Thank you for your note and implementation update! I see that you have updated the front and AJAX to add a timeout. While I am reviewing your contribution, I need to understand how exactly this lockup is happening to know if this is the right approach. Because we are tunneling the request through the server there are two paths opened. Could you please explain how the lockup is happening? Are you saying that the browser become unresponsive for this page load? Or are you saying that other access to the same instance from other browser tabs are also impacted? |
|
Hi, so I just tested it with a new FS instance with the sidebar installed. Then i tested with my changes, with the timeout in place the system will free up resources faster and is reachable faster, but a lock is still doable by clicking the refresh repeatedly. Hope this helps |
|
Thank you for testing, that is different environment than I have been using and good to know. Based on your results, it seems that the more appropriate solution is to set a timeout on the server side. That is because, for example, if the client loads the page and disconnect from the Internet, then the request will still be running on the server side and could lock up the limited available threads. The timeouts you have done are appropriate, and they can apply on the server side. We probably do not need to do this now, but if somebody asks, then we could also make this timeout configurable in the settings. |
|
+1 on this change. We had the same problem. When the webhook endpoint is unreachable, PHP workers pile up until FreeScout freezes. A timeout fixes it. |
Hi, thanks again for this nice extension.
While running in production we ran into a problem that the whole fs freezes, because the webhook endpoint was not reachable. It locks up php workers until there are none left.
I added a timeout to the post request to fail quicker than
max_execution_time.BR Paul