-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connections to google/apple not closed #67
Comments
Couple additional questions:
|
No, we are using 0.16.0. As I look into the code the PushSenderService creates new apn client for every call of /send endpoint: I think this may be the cause because I cannot see closing the apn client anywhere. Maybe there is the same problem for fcm. Version 0.17.0 seems different - it holds single instance of apn/fcm for application id. We have to try it. |
Yes. The documentation for underlying library was improved this October by adding the Pushy - Best practices page, hence we updated the implementation based on it. Please let's try 0.17.0. Please mind that the SQL schema has changed - new tables were added and field names became more consistent. |
Here is the difference script between 0.16.0 and 0.17.0: --- create new sequences
CREATE SEQUENCE PUSH_CAMPAIGN_SEQ START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE PUSH_CAMPAIGN_USER_SEQ START WITH 1 INCREMENT BY 1;
--- create new tables
CREATE TABLE PUSH_CAMPAIGN (
ID NUMBER(19) PRIMARY KEY NOT NULL,
APP_ID NUMBER(19) NOT NULL,
MESSAGE VARCHAR(4000) NOT NULL,
IS_SENT NUMBER(1) DEFAULT 0,
TIMESTAMP_CREATED TIMESTAMP(6) NOT NULL,
TIMESTAMP_SENT TIMESTAMP(6),
TIMESTAMP_COMPLETED TIMESTAMP(6)
);
CREATE TABLE PUSH_CAMPAIGN_USER (
ID NUMBER(19) PRIMARY KEY NOT NULL,
CAMPAIGN_ID NUMBER(19) NOT NULL,
USER_ID NUMBER(19) NOT NULL,
TIMESTAMP_CREATED TIMESTAMP(6) NOT NULL
);
--- alter existing tables
ALTER TABLE POWERAUTH_PUSH_SERVER.PUSH_DEVICE_REGISTRATION RENAME COLUMN LAST_REGISTERED TO TIMESTAMP_LAST_REGISTERED;
ALTER TABLE POWERAUTH_PUSH_SERVER.PUSH_MESSAGE RENAME COLUMN SILENT TO IS_SILENT;
ALTER TABLE POWERAUTH_PUSH_SERVER.PUSH_MESSAGE RENAME COLUMN PERSONAL TO IS_PERSONAL;
ALTER TABLE POWERAUTH_PUSH_SERVER.PUSH_MESSAGE RENAME COLUMN ENCRYPTED TO IS_ENCRYPTED; Also, make sure there is sequence |
This issue will very likely be fixed in 0.17.0, where we fixed the logic for creating / caching APNS and FCM clients for various applications. If the issue persists, please feel free to reopen. |
We tried to loadtest our backend and pushserver. We were sending 1500 individual pushes (/message/send) at rate of 20/s.
At first it looked fine then in about 1/2 of load data the push server started to fail with errors:
and:
java.lang.NoClassDefFoundError: io/getlime/core/rest/model/base/entity/Error
(but this is probably only a consequence of the Too many open files error)
Number of file descriptors are indeed close to our linux max:
It looks like the cause is one of following:
The text was updated successfully, but these errors were encountered: