Comments (5)
The issue is in fact the exact same as #69. The connection hasn't been lost, it is just unable to create one due to the pool being full.
from rapns.
Actually, it looks like the error message may be mixing terms here, or perhaps there are two separate exceptions. There is a connect_error with MySQL because the database authentication does not complete within MySQL's connect_timeout
. Increasing the timeout from 5 to 10 seconds should help with this set global connect_timeout=10;
.
from rapns.
@tpoland I don't think that will help. The ActiveRecord connection pool is on a per-thread basis. rapns worker threads are long lived and therefore never release their claim on a database connection. Increasing the timeout will not help because no threads are going to release their connection.
This does however make me think that the solution to this is to simply have workers explicitly release connections like a Rails request lifecycle does.
from rapns.
@ileitch I was thinking that this should prevent the ActiveRecord ConnectTimeout perhaps abandoning less connections in the pool. Maybe the pool change could be combined with restarts of the RAPNS worker threads (via monit) at regular intervals so that you don't end up with too massive a pool.
from rapns.
Please try 2.0.5.rc1
from rapns.
Related Issues (20)
- Update at the end HOT 2
- Rapns Worker stalls and not setting notifications as delivered HOT 8
- Multiple databases support HOT 2
- Trying Rapns with Safari Push HOT 10
- NoMethodError raised when GCM post responds with 500
- add notification table HOT 4
- Rapns daemon process get killed HOT 4
- [ERROR] NoMethodError, undefined method `to_binary' for Rapns::Notification HOT 4
- GCM returns an error for messages with Spanish characters
- new release? HOT 5
- fatal: deadlock detected HOT 1
- fatal: deadlock detected
- ActiveRecord::ConnectionTimeoutError HOT 3
- NameError, uninitialized constant Rapns::Daemon::Apn HOT 3
- Notification received on the phone but the rapns_notifications database still list the notification as not delivered
- apns slow HOT 2
- Testing github-issues-import.
- Best practise for maintaining rapns_notifications table.
- Certificate has been revoked (Rails Console & Controller both) HOT 1
- @app should be @app.name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rapns.