简体   繁体   中英

Problems logging into SQL Server 2012 (64 Bit)

I am programming an agent-based Simulation based on the JADE Framework. Basically this framework creates agents (each agent has an own thread) and provides standardized interfaces for communication between the agents.

Nevertheless when my agents are beeing created, they are accessing a MS-SQL 2012 (64 bit) Server (installed on the same machine) at one time. It's a very easy statement, that gives back an ID:

"SELECT GeoID FROM "
                + "[weatherman_de].[dbo].[geo]" + " WHERE lat_rot = "
                + loc.getLatit() + " AND long_rot = " + loc.getLongit();

The problem is: Sometimes when i start my application everything works fine , it's slow but it works ok. But sometimes i am getting different types of errors, that lead my application to crash directly at the beginning. Either it's a connection reset:

com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1352)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1339)
    at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1654)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.Prelogin(SQLServerConnection.java:1117)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1038)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)

or it's a connection refused:

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP 
connection to the host localhost, port 1433 has failed. Error: 
"Connection refused: connect. Verify the connection properties. 
Make sure that an instance of SQL Server is running on the host 
and accepting TCP/IP connections at the port. Make sure that TCP 
connections to the port are not blocked by a firewall.

Like mentioned, this error messages doesn't occur every time when i run the application. I would say in 7 of 10 times i am getting the error messages (same preconditions)

When my application is running fine, i checked the performance values:

  • the NT Server process uses 2,5 GB of Ram and 50% Cpu.
  • The database is itself about 1 GB big and is saved on a Crucial M550 SSD.
  • JAVA(eclipse) ist taking 2 GB of Ram (about 2500 threads) and also
    50% of CPU Usage. CPU is a Intel 2500k (4 cores)

My application is deterministic, so they aren't any random functions or something like that, that may have impact on performance because of any IF junctions or whatever. The output is(or should be) (when it's working) always the same.

So are there any hints where i can start to stabilize my database? I am thinking about upgrading my computer, but that's the last option.

也许您没有关闭资源并耗尽所有可用资源。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM