Query exception laravel 5.4

﹥>﹥吖頭↗ 提交于 2019-12-13 03:34:26

问题


When i will do a login sometimes on my laravel application i face this error:

Someone knows what could be this?

PS: this not happen all times;

I'm using xampp on a x64 machine with windows 10 home, with a core i5 processor, and 8 GB of RAM. Also using a virtual server to run on development mode.


回答1:


The error actually does not come from MySQL, but from Windows itself:

When a connection is closed, on the side that is closing the connection, the tuple {Protocol, Local IP, Local Port, Remote IP, Remote Port} enters a TIME_WAIT state for 240 seconds by default.

In this case, the protocol is corrected - TCP

Local IP, Remote IP, and Remote PORT are also typically fixed. Therefore, the variable is the local port.

What happens is that when you do not bind a port in the range 1024-5000 is used. So, roughly, you have 4000 ports. If you use all of them in 4 minutes - meaning that you make 16 web service calls per second for 4 minutes, you will exhaust all ports. That is the cause of this exception.

In other words, you ran out of doors in the dynamic range. This probably should not be happening.

how to fix: To set TcpTimedWaitDelay (TIME_WAIT): Use the regedit command to access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey. Create a new REG_DWORD value named TcpTimedWaitDelay. ... Stop and restart the system.



来源:https://stackoverflow.com/questions/51733111/query-exception-laravel-5-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!