Unable to fetch a connection

I found this exception in the live logs for one of my devices. I’ve been getting it pretty often since the December 19 outage. Does anybody know what it is?

7:04:13 PM: error org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.id as id88_0_, this_.version as version88_0_, this_.date_created as date3_88_0_, this_.key as key4_88_0_, this_.type as type88_0_, this_.value as value88_0_ from server_config this_ where this_.key=?]; SQL state [null]; error code [0]; [SimpleAsyncTaskExecutor-702] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:50; busy:1; idle:0; lastwait:30000].; nested exception is org.apache.tomcat.jdbc.pool.PoolExhaustedException: [SimpleAsyncTaskExecutor-702] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:50; busy:1; idle:0; lastwait:30000]. @line 121 (sendSwitch)

1 Like

You might want to post here what is this device and what DH you are using. That would make the guessing game easier for anybody.

It’s a Leviton Decora Wi-Fi switch using the official SmartThings DTH.

@posborne, @Bryce_Geiser can you pass this to someone who is working on the LAN/cloud connected DH for this device? Thanks!

FYI - I’ve seen this error all over the place since the December 19 outage. I don’t think it’s specific to the DTH. I think there’s still a systemic issue that hasn’t been resolved.

For what it’s worth, my setup doesn’t even have a hub. I do everything cloud-to-cloud.

Hello, @dds82

Please submit a ticket to Dev Support

1 Like

I did that 3 days ago. No response yet.

1 Like

Thanks @erickv popping in. I was just about to tag you too.

1 Like

I have seen similar errors in the live logging from a variety of SmartApp and DTH for about 2-3 weeks.
If it makes any difference, i am on na04-useast2 shard

I second this. Support has been giving me the run-around because they say they don’t support 3rd party integrations. I consider it lucky that I got the exception inside an official DTH. It seems like it’s been happening ever since the December 18 outage. Maybe something wasn’t fully fixed?

So am I.

Do you have an open support ticket?

@Brad_ST can you provide any help on this?

I have three open tickets:
#865853 in regular support (no response to that one yet)
#6675 in developer support
#6686 in developer support

It looks like the same exception happened in two different places: #6675 has it in the WebCore SmartApp; #6686 has it in the Leviton Decora Wi-Fi DTH.

As I mentioned earlier, I strongly suspect there is some residual error that wasn’t fixed completely after that widespread outage on December 18.

Is this causing issues with device control or SmartApp execution?

I flagged this issue internally and believe it will be assessed later this week due to the holiday.

3 Likes

It’s causing serious issues with smartapp execution – specifically, when this exception is thrown, the smartapp that gets it is guaranteed to time out.

Over the past 2 weeks, I noticed that a lot of my webcore pistons would seem to “miss” events from devices, even though the events would be present in the device’s history. First I thought it was their bug, but as I investigated, I noticed that each missed event correlated with one of these exceptions in the live logs for either the webcore smartapp or the device being controlled. The exception would always be exactly 30 seconds after the event, which makes sense, since that’s what it says the timeout is:

My best guess is that the underlying attempt to get a connection out of the pool is a blocking call, so this exception causes whatever smartapp is running to time out, since smartapps only have 20 seconds to run, and the call to get a connection blocked for 30 seconds.

It’s worth mentioning that whenever I got this exception in code that I have access to, the line of code it referenced was always trying to call into the SmartThings API, most often the runIn() method.

That’s as much as I was able to figure out… Hopefully it helps someone on your side track it down.

1 Like

In for a resolution. I’m experiencing the same errors in the live logs and the same spotty smart app behavior.

I too am experiencing these issues in the na04-useast2 that’s in this same timeframe.

Getting hit hard right now. Lots of motion events failing. A harmony hub event failed to trigger a piston for me as well tonight.

A couple motion events missed here, shard 1. Started live logging to see what I can capture.

I’m missing lots of events on changed virtual switch states and pistons only partially running. Here’s another from this morning:

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.id as id70_0_, this_.version as version70_0_, this_.date_created as date3_70_0_, this_.key as key4_70_0_, this_.type as type70_0_, this_.value as value70_0_ from server_config this_ where this_.key=?]; SQL state [null]; error code [0]; [SimpleAsyncTaskExecutor-323] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:50; busy:0; idle:0; lastwait:30000].; nested exception is org.apache.tomcat.jdbc.pool.PoolExhaustedException: [SimpleAsyncTaskExecutor-323] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:50; busy:0; idle:0; lastwait:30000]. @line 1144 (processSchedules)

@dds82 @Brad_ST Have either of you heard any updates?

Thanks

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.