Remember: A thrilling solution to solve the problem of server without solution

Source: Internet
Author: User

January 20, 2017

Today is an exciting day, why do you say so? Alas, a nose a tear ah ~ Finally the server a huge bug to solve!

The origins of things are like this. Since there are two servers in our company, one is a Web server, one is a database server, because of the previous business reasons, we need to merge two servers together, so decided to shut down the database server, the data migrated to the Web server, in the evening, everything went smoothly. After almost a week's time. From time to time, our system's back-end website has the following problems:

Session state requests cannot be made to the session-state server. Make sure that the ASP. NET State Service (ASP) is started and that the client port is the same as the server port. If the server is on a remote computer,
Please check the value of the hkey_local_machine\system\currentcontrolset\services\aspnet_state\parameters\allowremoteconnection, Ensure that the server accepts remote requests.
If the server is on the local computer and the registry value mentioned above does not exist or is set to 0, the state server connection string must use "localhost" or "127.0.0.1" as the server name.

I believe that a lot of people have encountered such problems, but such a problem for me is very simple, only need to open the server's ASP. NET State Service can be, easy to solve. But do you know what weird things happen, I check the server all this is normal, but still have this problem arises, and this problem it is not always appear, but occasionally will appear this problem, especially annoyed, no matter how I check the information on the Internet, how to modify the configuration, everything is useless, why??? This problem is easy to solve in the past, why not this time? There is no way this problem can be debugged locally, so the problem must be on the server side, but all the configuration has not moved, why or not? I even thought of restarting the server, but after each restart, after a few hours, and this problem will arise, I have no words, I can not have a problem to restart the server Ah, this certainly not ah! I also suspect that the database migration problem, but I think it can have any relationship, it is not possible, and the database certainly does not matter, or find another way.

I also thought of updating the server patch, but updated or not! How to do AH! I began to doubt life, this problem has been bothering me for almost three days, during the period also appeared server CPU reached 100%, I go, how to do AH! Later, I found that using our system to place orders, there has been a new problem not encountered before,

1 The  operation on the socket cannot be performed because the system has insufficient buffer space or the queue is full ...

See this question, I immediately excited, I understand, certainly is this problem caused, not the last ASP. NET State Service problem caused, I feel finally saved. I started to find the solution to the problem, but found the solution to let me down, what virtual memory is not enough, what disk space problems, what modify the registry value, what access is too large, the port is not enough problems and so on, after analysis, I think it will not be caused by these problems, we visit the volume of a day is not much, Hundreds of is good, how can be these problems ... Feel the heart again lost, alas how to do, but I know must be this problem caused, must start from this problem,

So I insist continue to check the information according to this problem, according to my analysis, began to think that it should be a program problem, what is the dead loop, or memory leaks, the connection did not release the related issues, I later saw that there is a data that is, in the task Manager to see the process of the handle number, and then I went to check, I found that the problem of the site has a very high number of handles, almost as much as the operating system kernel, nearly 2000, and then the memory take up almost 2 G, which is very abnormal, I am sure this is the problem of the system.

Then I restarted the process, I went to the site to order the normal operation, this time no problem appeared. But I have observed that the number of memory and handles in this process has grown particularly fast, and I think I can't go back to the process at any time, or find the fundamental problem! After I went online to find the reason for the growth of the handle, it is speculated that there may be resources in the program has been occupied, then not released, the port has been increasing, causing the server problem. Finally, I realized that our system will be used to websocket, and our server WebSocket service does not open, AO ~ I know, this is the reason, because the program in the WebSocket has been unable to find the server, so will always connect, constantly re-connect, The port is constantly turned on, so the previously described issue occurs.

Ah Ah Ah ~ finally understand, and then I started the server WebSocket service side, the problem is solved!!!

Why does not open the WebSocket server, because the previous program has been changed, and will not use WebSocket on this servers, but the code does not cancel the WebSocket request function, so now can not shut down the WebSocket server, Follow slowly again to change it!!!

Alas ~ the heart is tired! Through this experience, is mainly recorded, encountered such a problem of no solution, the need for how to solve the problem, as a ring!

Remember: A thrilling solution to solve the problem of server without solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.