-
Notifications
You must be signed in to change notification settings - Fork 201
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
Uniqush doesn't handle invalid payload received by apns server #24
Comments
@cmabastar-gumi Thanks for your report! uniqush-push does not check the size of the message, I can fix this. However, OOM is not what I expected. Even if the message is too large, as long as it fits into the memory, there should not be OOM. I tried UTF-8 characters with APNS, it can be correctly sent (and displayed on the screen.) Let me see if I can reproduce the bug. It would be great if you can provide me more information so that I can easily reproduce it. |
@cmabastar-gumi I tried large payload with version 1.4.3, it can report error correctly. However, I didn't try concurrent connections. BTW, I just added a line of code to check the payload size before sending it. I hope it can fix this problem. Do you want me to build a binary for you? (it's in the exp branch) |
@cmabastar-gumi I probably figured out the reason of OOM error. Would you please provide the answer for the following questions?
|
@monnand Hi, Sorry for the late reply. Just got into the office.
Here's the message from /var/log/messages: (Not sure if this helps )
|
@monnand , How do you suggest to improve our apns push? Currently we only have 1 uniqush server that is handling 32 concurrent connections, it seems that whenever we are sending apns push it slows down on its http-requests. GCM is ok and fine. |
@cmabastar-gumi Your report is very helpful. I just tested the APNS and it is really slow. Now let's first focus on the payload size. Right now, I have created a set of binary files which has already fixed the payload size problem. i.e. It will refuse to send anything if the payload is too large. Besides, it also fixed a memory leak bug, which may or may not be related to the OOM error. These binary files can be downloaded from: I'm not sure if they can fix your problem, but you can give it a try. NOTE: I did not improve performance in the code now. I will profile the program and improve the performance in the next week. (I have a travel plan this week.) Thank you very much for your report. I will do my best to fix it. |
Thanks @monnand |
@cmabastar-gumi Now I'm pretty sure the performance issue is caused by the feedback checking mechanism. It is considered as a bug, see #26. I will upload a fix soon. |
Thanks for the quick release. This helps a lot :D |
Hi, Just wanna know if you'll do a fix to improve sending messages to APNS? I'm Cheers, Christopher Marlon S. Abastar On Sun, Jul 7, 2013 at 3:23 PM, monnand notifications@github.com wrote:
This email and any files transmitted with it are confidential and intended |
@cmabastar-gumi How's the performance of the recently build? (version 1.4.4) If it is still a bottleneck, then it definitely deserves a high priority. |
I will consider this as fixed and put my effort on #27 |
GCM is ok but apns has restrictions of maximum payload of 256 bytes. This happens when the user sends a huge message or simply messages that are utf8-encoded. Uniqush should complain about this issue.
Uniqush will be OOM killed by the kernel if handling this 'invalid payload'. We tested this with concurrent connections sending messages via celery. We had 8 workers and with 4 concurrency running each worker. When trying to send an invalid payload size, uniqush will crash and killed by the kernel.
The text was updated successfully, but these errors were encountered: