Entity Framework Server Connection timeout? - entity-framework

I Use Entity framework 6 and trying Connect MSSQL Server .
My problem is MS SQL Serve is closed with timeout not set
how to ms sql server is closed set timeout ?
I Trying this.Database.CommandTimeut=10 but not working I wait 1 minute

Related

Firebird Error while i trying to select from one Table

Engine Message:
Unable to complete network request to host "localhost".
Error writing data to the connection.
An existing connection was forcibly closed by the remote host.
I use Flame Robin as a client and Firebird 1.5....
Any suggestions please

postgres query timeout issue while using connection pooling in JBoss

I am facing the below issue
ERROR: canceling statement due to user request
inconsistently after I enabled query timeout for xa datasource in my xxx-ds.xml. I have added the following in my ds xml file.
<query-timeout>180</query-timeout>
The query timeout is set for 180 seconds, which means any sql query
that takes more than 180 seconds will get cancelled from application
server side.
But the issue I am facing is inconsistent and the queries gets timed out now and then without taking exactly 180 seconds.
We are using connection pooling also.
While searching stackoverflow found this question, which discusses about the possible causes for this issue while using connection pooling.
The solution suggested there was to set statement_timeout setting in postgresql.conf file. But it is bit difficult for me to enable statement_timeout setting in my database environment as the DB server is shared by multiple applications.
I would like to have a solution to terminate timed out queries from client side effectively and consistently while using connection pooling. I am using
JBoss 4.2.2-GA
postgresql 9.2 (64 bit)
java 1.7
postgresql-9.2-1002.jdbc4.jar
It looks like the issue is with postgresql driver 9.2. When I upgraded to 9.3, issue is fixed.

SQL Server 2008 R2 ODBC Error: SQL state HTY00

My application server (say 192.168.100.1) and database server (say 192.168.100.2) both are on the same domain. I'm trying to create an ODBC connection from the application server to a SQL Server database on the database server, but at the time of login it generates this error:
Microsoft SQL Server Login
Connection failed:
SQL State: 'HYT00'
SQL Sever Error: 0
[Microsoft][ODBC SQL Server Driver]Login timeout expired
I've checked all configuration for SQL Server and tried possible solutions without resolving this issue.
Important:
A DSN can be successfully created from my own PC but when attempting this server to server as described above, ODBC is facing this problem.
OK, I have got the solution. Sometimes, if SQL Server can't be found on network by its name while creating DSN in windows, the logging in takes time more than usual which tells ODBC manager that Database Server we are looking for is not responding or responding too late.
Solution.
Instead of selecting server from the list while making dsn, use 'server-ip\SQLExpress'.
e.g 192.168.100.2\SQLExpress.
Thats All.

Postgres FDW Connection Linux

I am actively working with fdw under windows and Linux.
Under windows opened fdw connections on the other side are closed immediately if the main (and reading/writing) connection under windows is closed.
But under Linux opened fdw connections on partner stay active and open even if the initiating connection is closed.
E.g.
Server 1 (Windows)
Server 2 (Linux)
Server 1 makes a connection to his own local database. Within this connection, he writes/read a table which is a table on Server 2 and is represented locally by the fdw. On Server 2 the postgres_fdw connection to server 1 is visible. If server 1 closes the connection to his local database I can see that the postgres_fdw connection on Server 2 is already closed, which is perfect.
The other way round if I do this from Linux the postgres_fdw connection on Server 1 is still existing event if the local connection on Server 2 is closed.
Is there any possibility to config this?
What version of postgres are you running?
Are you using a Web / application server?
There may be a scenario such as nginx with keepalive connections where the HTTP sessions and the number of Postgres sessions grows beyond your PG connection limit

How can UNCLOSED connection be found in OC4J/Oracle?

I fixed and use Connection Pool to get the DB Connection from JSP to Oracle Database now.
But then I found out from the OC4J console at once that there are many UNCLOSED/NOT-CLOSED connection.
I am using OC4J 9.0.4.1 and Oracle 10g. Is there any effective way to find out the location or area that the connection is not closed.
In addition, I would like to know the followings:
1) The UNCLOSED connection means the Connection or ResultSet or Statment ?
2) IF Connection for the ResultSet and Statement is closed, the corresponding ResultSet and Statement are closed automatically too ?
I'd expect that this is easiest to detect on the server side - one assumes (!) that there is a 'show me all the open connections' report or command on the server that should show up a list of those connections together with the last executed SQL on that connection (am coming from the MSSQL side of things here - this doesn't sound like too much of a stretch, tho').
Unclosed means that the connection has not been closed.