Skip to content
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

Sending push notification result in server shutdown. #1240

Closed
scorpion1750 opened this issue Mar 29, 2016 · 12 comments
Closed

Sending push notification result in server shutdown. #1240

scorpion1750 opened this issue Mar 29, 2016 · 12 comments

Comments

@scorpion1750
Copy link

Hi,
I have meet problems of push notification.My app have more than 20,0000 users.

  1. When I am using the test curl command to query my installations ,I received the reply is 'Empty reply from server'?
    2)I check my server process finding out my parse-server had shut down.
  2. I pushed a notification using curl command received "{result:true}",but my server shut down too.
    4)Push to small amount of users could be find.
    I think the performance of push notification is not good as well as the Parse Dashboard,maybe some bugs result in the problem.I hope you can help me solve this problem.Thanks!
@drew-gross
Copy link
Contributor

Can you help us with debugging this a little? Since it sounds like a performance problem, can you first try doing the exact same set of commands on an app with fewer users and see if it works? Also, if you are running on an infrastructure provider that makes this easy, can you try running the server on a more powerful instance and seeing if that helps? Finally, could you show us any logs that the server outputs as it shuts down, and also describe the machine your setup is running on? Amount of RAM, CPU, DB size, storage type, and so on.

@scorpion1750
Copy link
Author

My server is on AWS instance type is t2.micro,database is mlab (M3 15GB,160GB).I pushed to about 12940 users yesterday, it seemed ok.I just tested again finding out that the running process's memory continue increasing and reach 100% percent finaly. I think this may be the reason causing this crash.
b8b1a0c4-da01-4378-9c93-974b3a9cca42

@scorpion1750
Copy link
Author

I also tested on my Mac pro ,it comes out the same result.But my pc has many free memory.
8bc0e31a-ace9-48d9-9c49-d295f7a6d4bd

@flovilmart
Copy link
Contributor

Yeah we may wanna use query cursors on that...

@gfosco
Copy link
Contributor

gfosco commented Mar 29, 2016

There was another issue yesterday about memory usage.. there could be a leak somewhere.

@drew-gross
Copy link
Contributor

Yah using cursors should help with push related perf issues.

@scorpion1750
Copy link
Author

When will you improve the push performance?I have another question that I cann't find out the open counts from self host parse-server.

@flovilmart
Copy link
Contributor

@scorpion1750 Pull requests are welcome!

@scorpion1750
Copy link
Author

Ok,I will try.

@flovilmart
Copy link
Contributor

Just to give your pointers:

  1. the query is executed in the PushController.js, we may wanna use a cursor and to it by batch, sequential, parallel.
  2. the push is sent through parse-server-push-adapter, if you want to improve some queuing etc... PR there

important notes:

  • GCM is limited to 1000 devices / send,
  • APN is a bit more complicated than that, as we use the binary interface that streams the push requests hopefully we'll be able to use the HTTP/2 API soon.

@scorpion1750
Copy link
Author

I have another question How can I statistic the open rate of one push ?It seems that the latest version have't implement this function yet.By the way I can't find the GCM.js,APNS.js in the source folder,Need I create the ParsePushAdapter.js?

@flovilmart
Copy link
Contributor

@scorpion1750 I opened a PR https://github.com/parse-server-modules/parse-server-push-adapter on the push adapter to leverage APNS performance improvements. We're waiting for a good review before merging and distributing.

For the open rate push, we don't support that now as the analytics endpoint is not implemented. I suggest you use a mobile analytics platform like mix panel, segment and friends.

I'll also be closing it for now as we splitted the push adapter into it's own repository. Feel free to re-open if you feel it's not right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants