Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
APPARENT DEADLOCK!!! ilke Muhtaroglu August 24, 2010 12:14 AM
RE: APPARENT DEADLOCK!!! Fernando Maza August 30, 2010 9:48 AM
RE: APPARENT DEADLOCK!!! ilke Muhtaroglu September 2, 2010 8:56 AM
APPARENT DEADLOCK!!! and i am using Postgresql DB please give the solution Gautam V Panpatil August 18, 2013 11:01 PM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil August 18, 2013 11:17 PM
RE: APPARENT DEADLOCK!!! Zsigmond Rab August 20, 2013 11:48 AM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil August 21, 2013 12:39 AM
RE: APPARENT DEADLOCK!!! Zsigmond Rab August 23, 2013 11:41 AM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil August 23, 2013 9:55 PM
RE: APPARENT DEADLOCK!!! Zsigmond Rab August 24, 2013 7:24 AM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil August 25, 2013 9:59 PM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil August 27, 2013 11:18 PM
RE: APPARENT DEADLOCK!!! Zsigmond Rab August 28, 2013 12:31 PM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil August 29, 2013 12:43 AM
RE: APPARENT DEADLOCK!!! Zsigmond Rab August 31, 2013 2:22 AM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 1, 2013 10:09 PM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 2, 2013 2:36 AM
RE: APPARENT DEADLOCK!!! Zsigmond Rab September 2, 2013 3:26 AM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 2, 2013 4:01 AM
RE: APPARENT DEADLOCK!!! Zsigmond Rab September 2, 2013 9:23 AM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 2, 2013 10:41 PM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 16, 2013 4:20 AM
RE: APPARENT DEADLOCK!!! Zsigmond Rab September 18, 2013 10:43 AM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 18, 2013 10:04 PM
RE: APPARENT DEADLOCK!!! Alpesh Bhavsar September 18, 2013 11:20 PM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 18, 2013 11:49 PM
RE: APPARENT DEADLOCK!!! Alpesh Bhavsar September 19, 2013 11:02 PM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 20, 2013 2:49 AM
RE: APPARENT DEADLOCK!!! Gautam V Panpatil September 23, 2013 10:37 PM
Application Becomes very slow Gautam V Panpatil November 15, 2013 2:40 AM
RE: Application Becomes very slow Zsigmond Rab December 12, 2013 10:36 AM
RE: Application Becomes very slow Ritresh Girdhar December 12, 2013 10:50 AM
ilke Muhtaroglu
APPARENT DEADLOCK!!!
August 24, 2010 12:14 AM
Answer

ilke Muhtaroglu

Rank: Regular Member

Posts: 223

Join Date: May 12, 2009

Recent Posts

Hi,

I have turned on network binding feature of mysql and then I get the following warning after exactly startup.

Writing following settings removes the warning but I dont know whether the values in this setting is right for production environment:

Any Idea is welcome for this Warning, especially about the values, whether they are okey for the production environment ?

1
2        jdbc.default.maxPoolSize=100
3    jdbc.default.minPoolSize=10
4    jdbc.default.numHelperThreads=10




 1
 2
 3
 406:51:27,622 WARN  [ThreadPoolAsynchronousRunner:608] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@3ae2ea71 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
 506:51:27,629 WARN  [ThreadPoolAsynchronousRunner:624] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@3ae2ea71 -- APPARENT DEADLOCK!!! Complete Status:
 6    Managed Threads: 3
 7    Active Threads: 3
 8    Active Tasks:
 9        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6af13a2c (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
10        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@322558e (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
11        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@431edf3d (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
12    Pending Tasks:
13        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1fd24038
14        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@24762cda
15        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4a7aaee9
16        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@3c716932
17        com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@39b1709e
18Pool thread stack traces:
19    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
20        java.net.SocketInputStream.socketRead0(Native Method)
21        java.net.SocketInputStream.read(SocketInputStream.java:146)
22        com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
23        com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
24        com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
25        com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1994)
26        com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:573)
27        com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1044)
28        com.mysql.jdbc.Connection.createNewIO(Connection.java:2748)
29        com.mysql.jdbc.Connection.<init>(Connection.java:1553)
30        com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
31        com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
32        com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
33        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:148)
34        com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
35        com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
36        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
37        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
38    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
39        java.net.SocketInputStream.socketRead0(Native Method)
40        java.net.SocketInputStream.read(SocketInputStream.java:146)
41        com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
42        com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
43        com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
44        com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1994)
45        com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:573)
46        com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1044)
47        com.mysql.jdbc.Connection.createNewIO(Connection.java:2748)
48        com.mysql.jdbc.Connection.<init>(Connection.java:1553)
49        com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
50        com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
51        com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
52        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:148)
53        com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
54        com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
55        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
56        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
57    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
58        java.net.SocketInputStream.socketRead0(Native Method)
59        java.net.SocketInputStream.read(SocketInputStream.java:146)
60        com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
61        com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
62        com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
63        com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1994)
64        com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:573)
65        com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1044)
66        com.mysql.jdbc.Connection.createNewIO(Connection.java:2748)
67        com.mysql.jdbc.Connection.<init>(Connection.java:1553)
68        com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
69        com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
70        com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
71        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:148)
72        com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
73        com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
74        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
75        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Fernando Maza
RE: APPARENT DEADLOCK!!!
August 30, 2010 9:48 AM
Answer

Fernando Maza

Rank: New Member

Posts: 1

Join Date: February 17, 2010

Recent Posts

Hello

I had the same problem, add this in the portal-ext and delete the cache of web server (tomcat / work / Catalina)
 1
 2    #
 3    # Liferay uses C3PO by default for connection pooling. The data source
 4    # factory can be configured to use JNDI or another pooling implementation by
 5    # modifying infrastructure-spring.xml. See
 6    # http://www.mchange.com/projects/c3p0/index.html#configuration for a list
 7    # of additional fields used by C3PO for configuring the database connection.
 8    # ISSUES:  https://forum.hibernate.org/viewtopic.php?t=947246&highlight=apparent+deadlock+c3p0
 9    # ISSUES:  http://issues.liferay.com/browse/LPS-11779
10
11    jdbc.default.acquireIncrement=5
12    jdbc.default.maxPoolSize=100
13    jdbc.default.minPoolSize=10
14    jdbc.default.numHelperThreads=10
ilke Muhtaroglu
RE: APPARENT DEADLOCK!!!
September 2, 2010 8:56 AM
Answer

ilke Muhtaroglu

Rank: Regular Member

Posts: 223

Join Date: May 12, 2009

Recent Posts

I solved it the same way, but such an error was not happening before... what about the numbers given ? Are they okey for production environment ? How to optimize them for deployment ?

ilke
Gautam V Panpatil
APPARENT DEADLOCK!!! and i am using Postgresql DB please give the solution
August 18, 2013 11:01 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

2013-06-18 06:14:53,411 WARN ThreadPoolAsynchronousRunner:608 - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@17afe1f5 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2013-06-18 06:14:53,419 WARN ThreadPoolAsynchronousRunner:624 - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@17afe1f5 -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@748530f2 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@54509ba1 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@78199245 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@56d22d9c
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@b0894c
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


WARN BasicResourcePool:1841 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@54509ba1 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:116)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:369)
at org.postgresql.Driver.connect(Driver.java:245)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at org.postgresql.core.PGStream.<init>(PGStream.java:60)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
... 14 more
WARN JDBCExceptionReporter:100 - SQL Error: 0, SQLState: null
WARN BasicResourcePool:1841 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@78199245 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:116)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:369)
at org.postgresql.Driver.connect(Driver.java:245)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at org.postgresql.core.PGStream.<init>(PGStream.java:60)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
... 14 more
WARN BasicResourcePool:1841 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@748530f2 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:116)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:369)
at org.postgresql.Driver.connect(Driver.java:245)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)

at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at org.postgresql.core.PGStream.<init>(PGStream.java:60)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
... 14 more
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
August 18, 2013 11:17 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

i am clearing he cache but where should place the file content which your wrote above

Thanking You
Zsigmond Rab
RE: APPARENT DEADLOCK!!!
August 20, 2013 11:48 AM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

taking a look at the exception which you pasted above, the problem is that there is a limitation for the number of connection on server side also, which is 30. If I'm write, you should set that higher there.

Regards,
Zsigmond
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
August 21, 2013 12:39 AM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi.. Zsigmond
Actually i am new in Spring mvc so please tell mi in detail and how u get the only 30 connection over there .
i need to change in maxPoolsize or numhelperthreads or any else


Regards
Gautam
Zsigmond Rab
RE: APPARENT DEADLOCK!!!
August 23, 2013 11:41 AM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

I meant, you need to change the PostgreSQL configuration. The origin of the exception is on the database server side.

Regards,
Zsigmond
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
August 23, 2013 9:55 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi...Zsigmond
Thanks for giving me reply,yes its server side exception but by default connection in postgresql are 100 so why its only 30 even i have used connection pooling and i changing the configuration of postgresql , please tell which kind of changes i have to made in configuration of postgresql.

Regards
Gautam
Zsigmond Rab
RE: APPARENT DEADLOCK!!!
August 24, 2013 7:24 AM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

do you still get the same exception? It's seems to be obvious from that one which you pasted before that the server cannot supply more connection as the limit (30) has been reached. You should recheck the sql server configuration.

An other idea. Is there any chance that there is a connection problem? Is the database server the same as the portal's one. You could check the communication.

Regards,
Zsigmond
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
August 25, 2013 9:59 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

hi..Zsigmond
Thanks for reply
i will check it....
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
August 27, 2013 11:18 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi....Zsigmond

This is my c3p0 configuration file and i/m using Spring MVC with PostgreSQL in hibernate


*******************c3p0.properties file************************
#hibernate.c3p0.timeout=3000
#c3p0.maxIdleTime=18000
#c3p0.idleConnectionTestPeriod=5
#c3p0.preferredTestQuery = SELECT 1;
*********************************************************************
It seems connection refused problem , i check there is no Session and Connection Problem because using spring and hibernate no need to open and close connection as per my knowledge concern.please refer it it and above.

Thanks

Regards Gautam
Zsigmond Rab
RE: APPARENT DEADLOCK!!!
August 28, 2013 12:31 PM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

just to clarify. Are you saying that it's a connection problem to the database? It's not clear for me.

Do you need further help? If so, is the database on a different server than the web server?

Regards,
Zsigmond
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
August 29, 2013 12:43 AM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi Zsigmond
it's Connection problem and my application is work some times and in between it's gives connection refused,multiple connection open errors.
i was check all configuration of that all are clear , i don't known what mistake done by me.earlier you told about configuration so that's why i put the configuration file
.it works on local but when it deploy on server its gives connection refused in tomcat log file
and
i got parser errors in log file .i'm not getting this

2013-08-29 13:03:07,490 ERROR PARSER:56 - Invalid path: 'order.id'
2013-08-29 13:03:07,490 ERROR PARSER:56 - <AST>:0:0: unexpected end of subtree
2013-08-29 13:03:07,490 ERROR PARSER:56 - left-hand operand of a binary operator was null
2013-08-29 13:03:07,491 ERROR PARSER:56 - <AST>:0:0: unexpected end of subtree
2013-08-29 13:03:07,491 ERROR SupplierDao:1975 - Error occured while getting total proposals received count for order.
2013-08-29 13:03:07,497 ERROR PARSER:56 - Invalid path: 'order.id'
2013-08-29 13:03:07,497 ERROR PARSER:56 - <AST>:0:0: unexpected end of subtree
2013-08-29 13:03:07,497 ERROR PARSER:56 - left-hand operand of a binary operator was null
2013-08-29 13:03:07,498 ERROR PARSER:56 - <AST>:0:0: unexpected end of subtree



Regards

Gautam
Zsigmond Rab
RE: APPARENT DEADLOCK!!!
August 31, 2013 2:22 AM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

what can be the difference between the communication with the database on the two servers?

Would it be possible to attach the whole log file which contains all of the exceptions?

Regards,
Zsigmond
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 1, 2013 10:09 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi.. Zsigmond

I am attache both log file first one is server log file and another one is local sever log file , the issues comes in connection refused which is in first log file and it will not comes on local machine and yesterdays problem comes in second one log file please see and let me known .
Thanks

Log file Error:
**************
2013-08-30 11:57:18,914 ERROR SupplierDao:2027 - java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: Invalid path: 'order.id' [select count(proposals) from com.vms.persistence.domain.Proposals proposals join proposals.order orders where order.id='75' and proposals.isDeleted='0' and (proposals.supplierStatus IS NOT NULL and lower(proposals.supplierStatus) != :proposalStatusDraft)]

****************
Query write in java file:
**************
query = em.createQuery("select count(proposals) from Proposals proposals join proposals.order orders where order.id='"+orderId+"' and proposals.isDeleted='"+IsDeleteEnum.NOTDELETED.ordinal()+"' and (proposals.supplierStatus IS NOT NULL and lower(proposals.supplierStatus) != :proposalStatusDraft)");
******************
Tables:
proposals: id serial NOT NULL, supplier_id integer, supplier_user_id integer, order_id integer, order_info text, ship_from character varying(512), time_in_transit charactervarying(20), delivery_commitment_date date, shipping_service_provider character varying(255), delivery_option character varying(255), additional_info text,
discount double precision, tax double precision, total_bill_amount double precision, buyer_status character varying(30), pmo_status character varying(30),supplier_status character varying(30), proposal_sys_gen_id character varying(30),
status character varying(255), created_date date, updated_date timestamp without time zone, sent_to_bc_date timestamp without time zone, sent_to_buyer_datetimestamp without time zone, fees_deducted integer DEFAULT 0, is_deleted integer,

Orders:
id serial NOT NULL,requestor_name character varying(100), requestor_id character varying(20), requestor_email character varying(255), requestor_contact_no character varying(15),requestor_address character varying(512), new_order_type integer, work_order_name character varying(255), wo_post_date date, repeat_work_order_id integer, shipping integer, individual_shipping_prices integer, order_start_date date, order_delivery_date date, message text, estimated_budget character varying(20), discount character varying(20), tax character varying(20), buyer_id integer,
work_order_task_type_id integer, work_order_status_id integer, currency_id integer, business_center_id integer,
work_order_status_name character varying(50), created_date date, updated_date timestamp without time zone, naics_code_id integer, sics_code_id integer,
buyer_user_id integer, sent_to_bc_date timestamp without time zone, sent_to_supplier_date timestamp without time zone, status character varying(30), sent_order_to_supplier_date timestamp without time zone, fees_amount double precision DEFAULT 0.0, pmo_status character varying(30),
sub_naics_code_id integer, sub_sics_code_id integer, is_deleted integer,
CONSTRAINT orders_pkey PRIMARY KEY (id ),

**********************************************************************************************
This two table i think query syntax wrong but i don't known where mistake is..
I need help

Thanks
Regards,
Gautam
Attachments: vms.log (2,960.3k)
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 2, 2013 2:36 AM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi Zsigmond
Issues of Hibernate Query is solved . i need c3p0 connection pooling configuration of postgresql DB

Thank you

Regards.
Gautam
Zsigmond Rab
RE: APPARENT DEADLOCK!!!
September 2, 2013 3:26 AM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

great to hear. What was the solution exactly?

Regards,
Zsigmond
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 2, 2013 4:01 AM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi..Zsigmond
That was HQL query syntax missing , Thanks for help
i'm Still getting Connection refused nd APPARENT DEADLOCK Errors

Thanks

Regards,
Gautam
Zsigmond Rab
RE: APPARENT DEADLOCK!!!
September 2, 2013 9:23 AM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

taking a look at your log file I can say still the same. These type of problems are because there is no more connection to acquire or it fails to connect to the server. What you can do is to find out why the server refuses the connection attempt (you can analyze the log files on the database side also) and/or to check thread dumps when you get these exceptions to see if some threads keep the connections.

In addition, you should find out what is the differences between the two machines. If it's working on one of these, but on the other, there must be some difference which cause this.

Regards,
Zsigmond
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 2, 2013 10:41 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi..Zsigmond

Thanks for reply i made many of changes and after few days we will put it on server then see what happened
its totally fine on local,i can't understand if c3p0 connection pooling is used with Spring and hibernate why the connection refused comes.
Any way Thanks for giving me response,i will inform you when it deploy on server

Regards,
Gautam
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 16, 2013 4:20 AM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi..Zsigmond
I need your help where the script file of postgresql database and tomcat

Thanks
Gautam
Zsigmond Rab
RE: APPARENT DEADLOCK!!!
September 18, 2013 10:43 AM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

what kind of scripts are you looking for?

Regards,
Zsigmond
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 18, 2013 10:04 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi Zsigmond

start up and shutdown script

Regards,
Gautam
Alpesh Bhavsar
RE: APPARENT DEADLOCK!!!
September 18, 2013 11:20 PM
Answer

Alpesh Bhavsar

Rank: New Member

Posts: 16

Join Date: April 18, 2012

Recent Posts

Hi Gautam,

I am also having same issue. Getting "APPARENT DEADLOCK!!!" message in log and have used c3p0. Can you please suggest which new settings you have used for c3p0.

errors I got:
2013-09-19 00:02:05,684 [] [v2.async.ThreadPoolAsynchronousRunner] [Timer-8] [137838151] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@31cfd68 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2013-09-19 00:02:05,743 [] [v2.async.ThreadPoolAsynchronousRunner] [Timer-8] [137838210] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@31cfd68 -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 10
Active Threads: 10
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@3d69ca42 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#4)
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@6c5dd28d (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)


Thanks.
Alpesh Bhavsar
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 18, 2013 11:49 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi Alpesh
check your database service is start or stop while you accessing the application , in my case same problem occurs.service of database is automatically stop when application is running .

hibernate.c3p0.timeout=3000
c3p0.maxIdleTime=18000
c3p0.acquireIncrement=5
idleConnectionTestPeriod=5
c3p0.preferredTestQuery = SELECT 1;
c3p0.minPoolSize=3
c3p0.maxPoolSize=100
c3p0.maxStatements=100
c3p0.idle_test_period=3600
hibernate.c3p0.numHelperThreads=10
hibernate.c3p0.validate=true


i have done this changes in c3p0.properties file but i m not check this changes on server , still i m finding some more changes .
Regards,
Gautam
Alpesh Bhavsar
RE: APPARENT DEADLOCK!!!
September 19, 2013 11:02 PM
Answer

Alpesh Bhavsar

Rank: New Member

Posts: 16

Join Date: April 18, 2012

Recent Posts

Thanks Gautam for your reply. I haven't made any changes for c3p0 properties. There was a issue with Database.
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 20, 2013 2:49 AM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi...Alpesh
in my code there is also database problem . r u fixed it or not ?
Gautam V Panpatil
RE: APPARENT DEADLOCK!!!
September 23, 2013 10:37 PM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi..Alpesh
are u solved the problem or not ?

Regards,
Gautam
Gautam V Panpatil
Application Becomes very slow
November 15, 2013 2:40 AM
Answer

Gautam V Panpatil

Rank: New Member

Posts: 24

Join Date: August 18, 2013

Recent Posts

Hi...Zsigmond
I am Using Tomcat6+centos+spring mvc+hibernate
and i am using two site on same server but the different port no , when i am accessing the site after some time it gets following error and application stop working
please suggest me

thanks in advanced.!!!



SEVERE: Servlet.service() for servlet ivms threw exception
java.lang.OutOfMemoryError: PermGen space
at sun.security.util.DerInputStream.readVector(DerInputStream.java:390)
at sun.security.util.DerInputStream.getSequence(DerInputStream.java:298)
at sun.security.pkcs.ContentInfo.<init>(ContentInfo.java:132)
at sun.security.pkcs.PKCS7.parse(PKCS7.java:152)
at sun.security.pkcs.PKCS7.parse(PKCS7.java:126)
at sun.security.pkcs.PKCS7.<init>(PKCS7.java:108)
at sun.security.util.SignatureFileVerifier.<init>(SignatureFileVerifier.java:96)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:284)
at java.util.jar.JarVerifier.update(JarVerifier.java:216)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:345)
at java.util.jar.JarFile.getInputStream(JarFile.java:412)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:752)
at sun.misc.Resource.cachedInputStream(Resource.java:77)
at sun.misc.Resource.getByteBuffer(Resource.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:436)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:215)
at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
at sun.security.jca.ProviderList.getProvider(ProviderList.java:232)
at sun.security.jca.ProviderList.getService(ProviderList.java:330)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:157)
Zsigmond Rab
RE: Application Becomes very slow
December 12, 2013 10:36 AM
Answer

Zsigmond Rab

LIFERAY STAFF

Rank: Liferay Master

Posts: 644

Join Date: January 4, 2010

Recent Posts

Hi Gautam,

sorry for the late answer, but I wasn't available for a while.

If you haven1T managed to solve this problem yet, you should check the jvm memory parameters, and/or do some research with a profiler and stress tests to see why you have this oom.

Zsigmond
Ritresh Girdhar
RE: Application Becomes very slow
December 12, 2013 10:50 AM
Answer

Ritresh Girdhar

Rank: Junior Member

Posts: 67

Join Date: July 15, 2011

Recent Posts

Hi Gautam

Please increase your server permanent generation memory space , Goto \liferay-portal-6.1.2-ce-ga3\tomcat-7.0.40\bin\setEnv.bat
and increase defined perm size -XX:MaxPermSize=216m

Have a nice good day!!!
Regards
Rit