Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I am encountering this error again and again in my tibco code.Somebody please tell how to solve this error
I am using tibco 5.7.3.
JDBC error reported: (SQLState = HY000) - java.sql.SQLException: [tibcosoftwareinc][SQLServer JDBC Driver]Object has been closed."
When a JDBC Query activity is configured to query in subset mode, the resultSet object is kept in the engine for subsequent iterations. Typically the resultSet object will only be closed and cleared from the engine if there is no more data left. However, keep in mind that the default connection idleTimeout is set to 5 minutes. This means that after 5 minutes of no activity the connection will get released. So if you wait longer than the idleTimeout value to retrieve subsequent subsets you will incur this exception since the connection has been closed and hence the resultset is no longer available.
Resolution:
Set Engine.DBConnection.idleTimeout to higher value in the Businessworks engine TRA file, say, 20 minutes so this connection can remain idle without getting released for next iterations for example: Engine.DBConnection.idleTimeout=20. For more details on this setting please see the list of Available Custom Engine Properties.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
what wrong with that ? I wanna del redis key in laravel but it doesn't work .it return queue statusenter image description here
queued response is used in redis transactions. When you start a transaction with multi every command you execute will be queued until you exec it.
> MULTI
OK
> INCR foo
QUEUED
> INCR bar
QUEUED
> EXEC
1) (integer) 1
2) (integer) 1
Probably in your code, exec part is missing or you may remove multi before executing your command.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I wrote a pool of workers, where the job is to receive an integer and return that number converted to string. However I faced a fatal error: all goroutines are asleep - deadlock! error. What am I doing wrong and how can I fix it?
https://play.golang.org/p/U814C2rV5na
I was able to replicate your issue and fix it by using a pointer to master instead of a normal variable.
Basically just change your NewWorker() method to this:
func (m *Master) NewWorker() {
m.Workers = append(m.Workers, Worker{})
}
Here's the output the program prints after the change:
0
1
2
3
4
5
6
7
8
9
10
.
.
.
Reason:
Everytime you called NewWorker() method, you weren't appending a worker to the same master object. That's why the slice never got populated with 3 workers, as should've been the case.
Go Playground
This question already has an answer here:
tailable cursor in mongo db timing out
(1 answer)
Closed 9 years ago.
How to specify a no-timeout option on the cursor?
I can run the job manually and from my laptop but something is going on the server and all the time I am getting this error:
MONGODB cursor.refresh() for cursor xxx
Query response returned CURSOR_NOT_FOUND. Either an invalid cursor was specified, or the cursor may have timed out on the server.
MONGODB cursor.refresh() for cursor yyy
The job is ran from a ruby scheduler file that and is specified as a namespace in rake
rake is calling for another ruby module in the middle, and the job dies during the execution of this module
I asked this question earlier and it got downvoted. Please, instead of downvoting explain what is so stupid about it, because I really need to solve this problem and can't figure out what is going on.
The server is kind of experimental and does not have any monitoring tools. But it seems to be reliable. And there are no other jobs running.
See the FAQ for the Ruby MongoDB driver for details on how to turn off the cursor timeout.
Example from there:
#collection.find({}, :timeout => false) do |cursor|
cursor.each do |document
# Process documents here
end
end
I am using hibernate 3 along with spring.My Hibernate configurations are as under :
hibernate.dialect=org.hibernate.dialect.Oracle8iDialect
hibernate.connection.release_mode=on_close
But after starting application, even if only one user accesses it then also I am getting this exception :
ORA-00020: maximum number of processes (550) exceeded
This is stacktrace:
Caused by: java.sql.SQLException: ORA-00020: maximum number of processes (550) exceeded
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1038)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.loadEntity(Loader.java:2037)
I have kept connection pool time out = 5000. I have also tried to found the cause and got that release mode may affect the mechanism of closing DB resources. But I couldn't find exact solution for that.
Please help..
Thanks in advance..
This is a database error not an application error so you need to go to the database to solve it. 550 processes is a lot more than it sounds so either someone has gone insane or you have a lot of inactive processes running.
The best way to find out is to query the v$session view or Gv$session if you're using a RAC, look at the STATUS column.
Take careful not of where all these sessions are coming from; the OSUSER, TERMINAL and PROGRAM will probably be the most useful. It might almost be worth creating a temporary table with this information - proof and a record afterwards. Then after checking that you're not going to break anything, and with your DBAs if you have any, kill all the inactive sessions simultaneously or one at a time.
That'll remove the error but if it's occurred once it can occur again, so you need to solve it. Either:
You've got a lot of people using the database.
There is an application / program somewhere that is not closing it's
sessions after it's finished.
Someone is connecting in the middle of a loop.
Whichever reason it is you need to track it down and correct it. I'd start with the program or terminal from v$session that had the most number of processes.
I'm using AS400JDBCConnectionPoolDataSource and AS400JDBCConnectionPool in order to create a connection pool inside my project.
this is my code for creating it:
AS400JDBCConnectionPoolDataSource dataSource = new AS400JDBCConnectionPoolDataSource();
dataSource.setServerName(DEVELOP);
dataSource.setUser(USER);
dataSource.setPassword(PASSWORD);
dataSource.setDriver(DRIVER);
dataSource.setPassword(PASSWORD);
dataSource.setLibraries("*LIBL");
dataSource.setNaming(NAME);
AS400JDBCConnectionPool systemi_jdbc_pool = new AS400JDBCConnectionPool(dataSource);
systemi_jdbc_pool.setMaxLifetime(-1);
systemi_jdbc_pool.setMaxConnections(4);
systemi_jdbc_pool.fill(2);
My problem is that the connection is closed every 2-2.5 hours.. and I can't understand why , the max life time is set to -1 which means taht there is no limit on the time.
What could be the problem? how can I make the connection pool not to disconnect itseld?
Thank's In Advance.
There is an IBM i-specific community at midrange.com. You can try asking your question there.
If you get an answer there, maybe post the answer (or at least a link to the answer) here so others can find the answer as well.
found a solution:
Database Host Server Connections Drop after a Period of Inactivity
You must use systemi_jdbc_pool.setCleanupInterval(miliseconds) to indicate to mantainance thread.