Moderator
worker 5, 8, 12
Votes
0
Replies
24
Participants
Unknown
Messages
25
Moderator
worker 5, 8, 12
Moderator
Hm interesting
Moderator
appwrite | [2023-10-27 12:02:18 $8.0] WARNING Server::check_worker_exit_status (): worker(pid=1212, id=11) abnormal exit, status=0, signal=9
appwrite | Worker 12 started successfully
appwrite | [2023-10-27 12:02:39 $8.0] WARNING Server::check_worker_exit_status (): worker(pid=18, id=7) abnormal exit, status=0, signal=9
appwrite | Worker 8 started successfully
appwrite | [Error] Timestamp: 2023-10-27T12:02:56+00:00
appwrite | [Error] Method: GET
appwrite | [Error] URL: /v1/storage/buckets/:bucketId/files/:fileId/preview
appwrite | [Error] Type: PDOException
appwrite | [Error] Message: SQLSTATE[HY000] [2002] Connection refused
appwrite | [Error] File: @swoole-src/library/core/Database/PDOPool.php
appwrite | [Error] Line: 35
appwrite | [2023-10-27 12:03:18 $8.0] WARNING Server::check_worker_exit_status (): worker(pid=16, id=5) abnormal exit, status=0, signal=9
appwrite | Worker 6 started successfully
Moderator
I’d just give it more CPU personally, but it’s interesting that would happen, is 1.4.x more demanding than 1.3.x?
Moderator
Would increase costs, and I try to avoid that
Moderator
I'm using 1.3.8
Moderator
Makes sense, how big is the file?
Moderator
Also I had 3k request in a day with up to 40 realtime connections in such server and it handled it correctly with margin for even more requests so I don't think it's needed to have a bigger server 😅
Moderator
2MB
Moderator
You could exec into Appwrite and check the stack trace logs
Moderator
Meh same as the error log potentially though
Moderator
I got it right now so I have clean logs:
Moderator
Funny how iPhones can do so much but can’t open a text attachment, one sec
Moderator
It seems, to me at least, that the connection is simply failing, it might just be a simple “it’s reaching 100% for some reason because files are harder” or something similar because if the connection is just being refused without any errors, what else could it be?
Moderator
Maybe error causes the connection failing?
Moderator
Error probably causes it but the question is why? If it's just refusing the connection entirely, it's not much of an error, maybe it's a safety thing?
Moderator
No idea, sincerely
Moderator
A fact is that each file has a very large name
sounds about right. it gets cached so it doesn't freeze anymore, but then the cache expires and then all the previews need to be generated again
Moderator
And why when previews are being generated everything freezes?
Moderator
I understand they could take much CPU power for them being generated, but 100% CPU in 2 cores and freezing the instance for about 10 seconds I think It's too much
Moderator
If there isn't any solution, is there any way to limit CPU usage so the Appwrite instance doesn't gets freezed?
image processing can use up a lot of CPU. The only env var we have for previews is _APP_STORAGE_PREVIEW_LIMIT
Moderator
And setting that will improve anything?
if it's low, the previews won't get generated