How can I find the query that caused the kill state error? - session-timeout

I am using MSSQL and coding a big project.
I keep getting a kill state error from a linked server.
Cannot continue the execution because the session is in the kill state. Login failed for user 'user'. Cannot open database "example" requested by the login. The login failed.
I checked that the queries contain the with(nolock) line. But i can't detected
which query crashes the server.
How can I find the query that caused the kill state error?

Related

How to stop server from termination in nodejs?

I have dynamic values in the array (say 100) all values are Neo4j database queries (cypher) each queries brings 30 values from the server.
sometimes if an error occurs in say xyz number query, to handle those error occurred, I have used process.exit() in catch() of the session of Cypher query, because I want to stop complete execution and also discard previous values, but as it also kills the running server.
I want to evaluate everything from starting,
I want to restart the server again automatically.
or
Any other way in spite of using process.exit(), if there is anything which I can call so that my current execution stops and restart current request again from scratch
In short: the server should not stop when an error occurs.
Anyone help, please?
If you want NodeJs to start again when its terminated.
Just try to use the process manager program to run your node.
For example PM2

ProviderIncompatibleException was unhandled by user code

I have just got the latest code from SVN and I got the above error when I logged into my application. The exception message was:
An error occurred while getting provider information from the
database. This can be caused by Entity Framework using an incorrect
connection string. Check the inner exceptions for details and ensure
that the connection string is correct.
The inner exception says:
The client was unable to establish a connection because of an error
during connection initialization process before login. Possible causes
include the following: the client tried to connect to an unsupported
version of SQL Server; the server was too busy to accept new
connections; or there was a resource limitation (insufficient memory
or maximum allowed connections) on the server. (provider: Shared
Memory Provider, error: 0 - The handle is invalid.
The issue is, none of these suggestions seem like the cause. Any idea what might cause this?
You're going to love the solution to this. I restarted my machine and it works fine now. :o).

When should I close a NodeJS process?

In the article about node's domains, they say I should not ignore errors -
"The better approach is send an error response to the request that
triggered the error, while letting the others finish in their normal
time, and stop listening for new requests in that worker."
So my question is, on what types of errors should I close the process:
Should I close the process on any error?
what If the error is not part of the req/res cycle - should I still close the process? let's say I was doing some callculations on data from the DB, and then when saving it again to the DB, I got an error - should I close the process ?
Should I close the process only when I get "uncaught exception" ?
So in general, I would be happy for some general guidelines about when to close a node.js process.
Thanks.
This is something that is primarily about uncaught exceptions.
If your code throws an exception that isn't handled, as a result, some parts of your application may be in an invalid state because the code couldn't finish what it was doing. This is why it's recommended to close/restart processes that do this.
If your process encounters an error which your code handles, then there's no reason to do a restart - you specifically added handling code for the error so that the application does not go into an invalid state and can gracefully handle the error scenario.
So, the answer to the specific question when should you close is when there's an uncaught exception.

Node.js graceful exiting on exceptions while handling multiple users

I have read so far that on an uncaught exception it is best to restart the node.js server. However my concern is that for example when multiple users are using the same node.js server and an exception is thrown for one user's request the server would shutdown thus ending whatever processes was taking place for other users. An example would be when one user is in the middle of a critical transaction an uncaught exception is thrown for another user thus stopping the server and having the transaction incomplete and not rolled back somehow even.
In this case considering multiple users what is the best way/practice of handling exceptions
Regards,
MilindaD
process on uncaught exception does not restart the server, it allows Node to continue execution, so the other users will continue any transaction or handling as if nothing happened. Be careful with this method, though, you may use it but the code will be in an unknown state and it will continue execution from where it threw the error.

Obtaining cause of connection process error using status /event notice in wpa_supplicant

I am working with wpa_supplicant-0.7.3 .
Some time password entry by a user is wrong and it cause connection error.
I want to know , how to obtain the cause of connection error of wpa_supplicant in normal mode with status or event notice?
The wpa_supplicant logs would indicate a reason code for failure. Look at the wpa_supplicant header file to find the reason corresponding to the code (src/common/defs.h)
Also this link would help
https://supportforums.cisco.com/docs/DOC-14033

Resources