Re: Monitoring long running queries

2016-09-13 Thread Hugi Thordarson
That would be awesome. Most of our heavier queries are SQLTemplate now. - hugi > On 13. sep. 2016, at 19:18, Andrus Adamchik wrote: > > Hah, I didn't even know we had this feature. And it is used in that same > 'logSelectCount' method that I mentioned :) > > It

Re: Monitoring long running queries

2016-09-13 Thread Hugi Thordarson
Ah, *that* works brilliantly, thanks :). For future people stumbling upon this thread: If you get a ClassCastException—the property needs to be set as a string, not a number. - hugi > On 13. sep. 2016, at 19:08, John Huss wrote: > > Sorry, you're right. I posted the

Re: Monitoring long running queries

2016-09-13 Thread Andrus Adamchik
Hah, I didn't even know we had this feature. And it is used in that same 'logSelectCount' method that I mentioned :) It should actually get invoked for all types of queries: SelectQuery, SQLTemplate, ProcedureQuery and all their 4.0 fluent wrappers. Andrus > On Sep 13, 2016, at 3:08 PM, John

Re: Monitoring long running queries

2016-09-13 Thread John Huss
Sorry, you're right. I posted the wrong property. It should be this one Constants.QUERY_EXECUTION_TIME_LOGGING_THRESHOLD_PROPERTY On Tue, Sep 13, 2016 at 1:47 PM Andrus Adamchik wrote: > JDBC_MAX_QUEUE_WAIT_TIME is the max time to wait for connections from >

Re: Monitoring long running queries

2016-09-09 Thread John Huss
Also, this doesn't really work for SQLTemplate queries - it will print the log and the time taken, but the SQL is just "null". Not sure if it works for EJBQL queries. On Fri, Sep 9, 2016 at 9:06 AM John Huss wrote: > You can set the property in the module when creating

Re: Monitoring long running queries

2016-09-09 Thread Ken Anderson
We would like that too! Ken Anderson CTO Amphora, Inc. Mobile: +1 914 262 8540 www.amphorainc.com On 9/9/16, 9:42 AM, "Hugi Thordarson" wrote: Hi all, in EOF we could make the application log a warning if a DB query was taking

Re: Monitoring long running queries

2016-09-09 Thread John Huss
You can set the property in the module when creating your ServerRuntime: new Module() { @Override public void configure(Binder binder) { MapBuilder props = binder.bindMap(Constants.PROPERTIES_MAP); props.put(Constants.JDBC_MAX_QUEUE_WAIT_TIME, 8000); // 8 seconds } } This only will report

Monitoring long running queries

2016-09-09 Thread Hugi Thordarson
Hi all, in EOF we could make the application log a warning if a DB query was taking more than a specified amount of time to complete. Is there any location where I could plug into Cayenne to do something similar? We’re deploying a reporting system for a large-ish database and I know some