Back

Connection refused - Fatal error: Allowed memory size

  • 0
  • Self Hosted
Yasin E.
28 Sep, 2023, 06:31

I often take this life. Functions do not take action. openruntimes-executor sometimes stops. What could be the reason for this?

[Error] Message: Multiple internal curl errors has occurred within the executor! Error Number: 111. Error Msg: Connection refused [Error] File: /usr/local/app/http.php [Error] Line: 1025

TL;DR
Users are experiencing a "Connection refused - Fatal error: Allowed memory size" issue. One user solved it by adding "restart: unless-stopped" to their code. Another user solved it by flushing the Redis database. There is also a delay of 6-8 hours in processing data. When the "_APP_USAGE_STATS" is disabled, the code works without problems. The issue persists across different Appwrite versions. Some users suggest changing the memory with the "_APP_FUNCTIONS_MEMORY" environment variable. The error message also mentions internal curl errors and a connection refused issue.
Yasin E.
28 Sep, 2023, 06:34

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12658272 bytes) in /usr/local/vendor/utopia-php/storage/src/Storage/Device/Local.php on line 271 [2023-09-28 02:01:12 @1.0] WARNING Channel::~Channel() (ERRNO 10003): channel is destroyed, 1 consumers will be discarded

Allowed memory size/ how can i change?

Yasin E.
28 Sep, 2023, 06:35

Connection refused - Fatal error: Allowed memory size

safwan
28 Sep, 2023, 06:43

Can you please share the code for this function?

safwan
28 Sep, 2023, 06:44

You should be able to change memory with the _APP_FUNCTIONS_MEMORY environment variable. Have a look here: https://appwrite.io/docs/environment-variables#functions

Infinil
10 Oct, 2023, 10:39

facing the same issue

Infinil
10 Oct, 2023, 10:39

do u have 2gb ram vps?

Yasin E.
11 Oct, 2023, 05:08
Yasin E.
11 Oct, 2023, 05:08

8 cpu 32 ram

Yasin E.
11 Oct, 2023, 05:08

only run appwrite

Drake
14 Oct, 2023, 16:25

What version of Appwrite?

Yasin E.
14 Oct, 2023, 16:26

1.4.3 but now 1.4.5 and still continue same problem

Yasin E.
14 Oct, 2023, 16:26

When enable stats

Yasin E.
14 Oct, 2023, 16:27

Now all stats settings disable and no problem

Drake
14 Oct, 2023, 22:53

Interesting....πŸ€”

Yasin E.
14 Oct, 2023, 22:55
Yasin E.
14 Oct, 2023, 22:55

I only have 1 project and the usage details are like this.

Yasin E.
14 Oct, 2023, 22:57

There are 2 functions constantly running.

Yasin E.
14 Oct, 2023, 22:59

An extra problem.

The function listens to a database to create an event. and when the data arrives, it makes some calculations and writes it to another database table.

This event takes place, but it appears in the database 6 hours and 8 hours later. There is a delay of 6 to 8 hours in processing the data.

When _APP_USAGE_STATS=disabled, it works without any problems.

Yasin E.
14 Oct, 2023, 23:00

Sometimes I solve the problem by flushdb in redis.

Yasin E.
14 Oct, 2023, 23:06

and there is no restart here. After working for 1-2 days, the service goes down and it does not start working again.

I added restart: unless-stopped to this and solved this problem this way. πŸ™‚

Drake
19 Oct, 2023, 21:31

sorry you said changing _APP_USAGE_STATS does what?

Drake
19 Oct, 2023, 21:31

fixes the open runtimes executor memory crash problem?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more