Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
309 views
in Technique[技术] by (71.8m points)

Query exception laravel 5.4

When i will do a login sometimes on my laravel application i face this error: 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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_MACHINESYSTEMCurrentControlSet ServicesTCPIPParameters registry subkey. Create a new REG_DWORD value named TcpTimedWaitDelay. ... Stop and restart the system.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...