-
Notifications
You must be signed in to change notification settings - Fork 5
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
fetch files (after callback) => high php memory requirements #30
Comments
Do you probably have some small wrapper code for receiving file messages so that it can be reproduced easily? |
I use the official version of the Threema SDK. The structure is the same for all supported message types:
The handling of the message is processed by "public final function receiveMessage" within the "E2EHelper" class. (https://github.com/rugk/threema-msgapi-sdk-php/blob/official/source/Threema/MsgApi/Helpers/E2EHelper.php) My initial php configuration worked with 128 MB memory size receiving an exemplary image (about 1 MB) through "image dialog". Same image needs about > 300 MB php memory size receiving through the "file dialog". |
Mind that Threema clients usually compress images before sending, but this obviously should not make the image larger. |
I have sent a message to the Threema support. (message instanceof ImageMessage) (message instanceof FileMessage) |
With the libsodium library installed the PHP memory requirements are much lower. Sending an exemplary image (about 1 MB) through "image dialog":
Sending an exemplary image (about 1 MB) through "file dialog":
For me this is now O.K. |
Yeah, the php implementation is quite resource-intensive and buggy. |
Using the "E2Ehelper.php" class (threema-msgapi-sdk-php/source/Threema/MsgApi/Helpers/E2EHelper.php) I receive image and file messages via callback URL.
Sending an exemplary image (about 1 MB) through "image dialog" on my smartphone to the gateway account can be received untainted by the helper class E2EHelper.php. However, the same image needs a larger php memory allocation via the "file dialog", and often leads to the following annoying error.
Has anyone else problems with the reception of the messages and possibly propose a solution?
( but I do not mean an increase in the memory ... ;-) )
Best Regards
The text was updated successfully, but these errors were encountered: