Nov 25, 2017 at 7:11 PM, Hugi Thordarson wrote:
>> Hi all.
>> I've been fighting a bug that's been a pain to replicate. Here's a small
>> self-contained project that demonstrates the issue:
>>
>> https://github.com/hugith/concurrencytest-simple/
ates the issue:
>
> https://github.com/hugith/concurrencytest-simple/
>
> Just run Main.java to see it happen:
>
> https://github.com/hugith/concurrencytest-simple/blob/master/src/main/java/concurrencytest/Main.java
>
> The subject basically says it all: If I touch the DB in a T
r/src/main/java/concurrencytest/Main.java
The subject basically says it all: If I touch the DB in a Thread inside a
CommitLogListener AND am using a connection pool, it will fail with the
Exception/trace shown below. But the real kicker: This only happens if I'm
using a 3rd party connect
Currently Cayenne has no built in monitoring API. We'll likely be
building one at some point, based on JMX. But you can use JMX Java
tools right away. E.g. to take a peek at thread dump remotely:
http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html
If that also doesn't work for
Ari,
My original question was how can I query the Cayenne Connection Pool Manger to
find out how many connections are currently open and how many are currently
closed?
Is there a way to do this via the Cayenne API? (If there is I have not been
able to determine how to access the PoolManager
On 13/05/10 1:46 AM, Joe Baldwin wrote:
I don't believe I can execute the steps outlined in your reference (1. the
problem is not reproducible on my development machine and 2. the webhost
prevents command line access like this on the Linux server.)
Any other ideas?:)
Attach a profiler like Y
Andrus,
I thought you were referring to
Thread.dumpStack()
I don't believe I can execute the steps outlined in your reference (1. the
problem is not reproducible on my development machine and 2. the webhost
prevents command line access like this on the Linux server.)
Any other ideas? :
I think we are talking about different things. I am referring to this
(sorry the URL with lots of ads, just something i googled quickly) :
http://www.crazysquirrel.com/computing/java/basics/java-thread-dump.jspx
Andrus
On May 12, 2010, at 6:28 PM, Joe Baldwin wrote:
OK, I will implement this
OK, I will implement this. Do I need to make the query from the same
thread/session or will I get the same results from any session?
On May 12, 2010, at 11:19 AM, Andrus Adamchik wrote:
>
> On May 12, 2010, at 6:17 PM, Joe Baldwin wrote:
>
>> 1. Will this thread dump report anything that the
On May 12, 2010, at 6:17 PM, Joe Baldwin wrote:
1. Will this thread dump report anything that the MySQL exception
does not?
Yes, it will report who is holding to all those connections.
Andrus
i.e. I would like to query the connection pool
class to return information at the moment it is requested.
Thanks,
Joe
On May 12, 2010, at 10:45 AM, Andrus Adamchik wrote:
> Don't remember if you went through that already, but the easiest thing you
> can do to understand what
sec delay. )
Question:
I am pretty good at tracking down bugs, but this one is really
difficult to devise a methodical plan to solve. My only idea right
now is to monitor the Cayenne managed connection pool (with the
hopes that I can monitor open connections and associate the
lan to solve. My only idea right now is to monitor the
Cayenne managed connection pool (with the hopes that I can monitor open
connections and associate these connections with the cause). I have not been
able to figure out how to do this via the Cayenne API. I am convinced that
monitoring t
Michael,
> I'm not saying it is definitely a MySQL issue, but it could be the JDBC
> driver or the backend storage implementation.
True. The production box is using a very old version of MySQL with documented
innodb bugs, so it could be anything from innodb to the connector that is
causing th
It should also be noted that I was running against Sybase, so a
completely different JDBC driver and database. I'm not saying it is
definitely a MySQL issue, but it could be the JDBC driver or the
backend storage implementation. I'd be surprised if it was a direct
Cayenne issue. It would be good
Well, Wikipedia claims that the recommended stable version is 5.1.45. However,
the webhost claims that he has too many users to be able to upgrade (which is
a problematic answer since this will mean he can never upgrade).
He is convinced (without any proof) that the problem lies with my code o
It looks like 5.0.90 is the latest 5.0 release, so I'd say that
upgrading to at least would be a good start.
http://downloads.mysql.com/archives.php?p=mysql-5.0
It also says on that page that 5.0 is the oldest version currently supported.
5.0.50a is from Jan 2008.
The most current version is 6.
Ari,
> Very many people have stayed on the 5.0.x releases due to perceived problems
> with 5.1.x. There is nothing in either of those releases that should make the
> slightest difference to Cayenne.
I did some more research and found a report with *similar* symptoms
http://bugs.mysql.
On 17/04/10 11:49 AM, Joe Baldwin wrote:
the database is running on a production machine:
Sun MySQL - 5.0.51a
Linux 2.6.25-14.fc9.x86_64 (amd64)
Java 1.6
One thing I noticed was that my webhost is using MySQL 5.0.51a, while Wikipedia
documents 5.1.45 as the most recent stable release.
Mike,
the database is running on a production machine:
Sun MySQL - 5.0.51a
Linux 2.6.25-14.fc9.x86_64 (amd64)
Java 1.6
One thing I noticed was that my webhost is using MySQL 5.0.51a, while Wikipedia
documents 5.1.45 as the most recent stable release. The JDBC driver is
provided by the h
Someone more knowledgable would have to comment, but my suspicion is
that the problem is with your database or JDBC driver rather than with
Cayenne.
Perhaps if you describe your database setup (database, version,
anything else relevent), someone might have some additional ideas.
You might also tr
Michael & Andrus,
The DataSource Factory specified in CM is:
org.apache.cayenne.conf.DriverDataSourceFactory
> I've deployed a long-running (up 24x7) internal application before
> that had a max of 2 DB connections ...
Interesting - I saw one of you examples in which you used min = max
Hi Joe,
I've deployed a long-running (up 24x7) internal application before
that had a max of 2 DB connections using the built-in Cayenne
connection pooling mechanism and never had any issues with running out
of connections. The only reason I even used 2 was I had long-running
(several minutes) qu
Yeah odd, Cayenne checks out a connection from a DataSource only for
the duration of an operation, and then returns it back. So are you
using Cayenne-provided DataSource (DriverDataSourceFactory in the
Modeler), and not JNDI, DBCP or some other container-provided one?
Can you take a thread
Hi Michael,
min = 1
max = 10 (we changed this to 20 but then got the same error)
To my knowledge there are no long running transactions. Most are product list
fetches which should take less than a second each. There is some content
editing right now, so there are about 50-100 updates per day,
The connections are stored and reused. What is your min/max setting?
Do you have any long-running transactions?
On Wed, Apr 14, 2010 at 11:34 PM, Joe Baldwin wrote:
> Why would the DataContext be running out of connections in a web app with
> only a small amount of traffic?
>
> (I thought that
Why would the DataContext be running out of connections in a web app with only
a small amount of traffic?
(I thought that a group of connections were stored (base on the modeler
specification), and then reused for each transaction.)
Joe
27 matches
Mail list logo