In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the problem that the message client can not reuse the session with SPID 799". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to solve the problem that the message client cannot reuse the session with SPID 799".
Error log:
The message client cannot reuse a session with SPID 2799, which has been reset for connection pooling. The failed ID is 46.
This error may be caused by a previous operation failure. Check the error log for the failed actions that immediately precede this error message.
Message cannot continue execution because the session is terminated.
Message
Error: 18456, severity: 14, status: 46.
Message
Login failed for user 'wms'. Reason: the database "wms" configured in the login object cannot be opened when revalidating the login name used by the connection.
[client: 192.168.0.52]
Message
Error: 18056, severity: 20, status: 46.
Message
The client was unable to reuse a session with SPID 2799, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.
Case description:
When the SQLSERVER errorlog file keeps reporting an error of 10856, the CPU will be very low at the same time, and the SQL client logs in
Database query operation is normal; the number of IIS connections is skyrocketing, and the website cannot operate the database (such as login, basic query)
Analysis premise:
This question is very common, the official explanation is not very clear answer, it is either need to patch or need to set up IIS connection pool.
The premise of the analysis here is that the database has been patched, the string of IIS connection to the database is normal, and the user name and password are normal.
Analysis process:
For example, if the connection pool setting of 1500m IIS is normal, then the average connection pool size of each session is 1MB.
Database network packets default to 4096
If a request needs to return 20m data at this time, the packet size returned by the session from the database will exceed the session.
The connection pool size obtained is 4096, which requires more packets to be delivered than a normal request (request 1m reply). This session corresponds to the
The answer time needs to be longer than the average, and under normal circumstances, these dominant requests will not be much of a problem.
If the number of requests from IIS reaches 3000 at the same time, the average connection pool size allocated to each SESSION will be 0.5MB. If the same 20MB data is returned,
Then the SESSION time will be even longer!
If the client request returns 100 pieces of 30m data at this time, then the request at this time, when the database is returned to IIS, IIS will find that the connection pool does not have enough memory space.
When the SESSION is allocated, the connection pool size of the IIS does not automatically increase with the increase of client requests or the IIS server does not have more physical memory. In this case, IIS will
Because there is not enough connection pool space to cache the corresponding SESSION, but the subsequent client calls continue to apply to IIS, this time the problem comes!
IIS will release the SESSION that cannot be handled (or the IIS process down is dropped or IIS automatically restarts). When the database receives the SESSION request from the IIS side to query the data, it is ready to return to
When the SESSION of IIS, look for the SPID of the request, and find that the SPID of the request no longer exists, but the TCP connection of the database will not immediately abandon these because the SPID does not exist.
Data, at this time the traffic of the network card will increase! At the same time, the database ERRORLOG is full of such errors.
Solution:
0. First rule out whether DB has a deadlock
1. The most direct way is to increase the size of the IIS connection pool
two。 Is to find out the large session requests in the program and modify the code.
3. Limit the number of IIS processes and set the connection pool size according to daily operation (not recommended, as a last resort)
4. Database-side restrictions on sql calls often: SQL firewall or database restrictions on persistent connections (no recommendation, no choice, no way)
At this point, I believe you have a deeper understanding of "how to solve the problem that the message client cannot reuse the session with SPID 799". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.