stephanediondev / elasticsearch-admin

Web administration for Elasticsearch (2.x to 8.x): cluster, nodes, indices, shards, index templates, repositories, snapshots ...
https://stephanediondev.github.io/elasticsearch-admin/
MIT License
92 stars 10 forks source link

out of memory issue #83

Open cosmos1978 opened 1 month ago

cosmos1978 commented 1 month ago

When running this on a large cluster I am having issues with some pages in the gui. The audit page and the nodes view are not working. I am getting this error

`10.0.2.43 - - [09/Oct/2024:10:51:59 +0000] "GET /favicon-green-64.png HTTP/1.1" 200 108 "http://elasticsearch-admin.elkprod.idtv.bc/admin/cluster" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "10.0.0.26" 0.000 - . -

NOTICE: PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/symfony/http-client/Response/CommonResponseTrait.php on line 88

NOTICE: PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes) in /var/www/html/vendor/composer/ClassLoader.php on line 576

2024/10/09 10:52:03 [error] 21#21: *23 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/symfony/http-client/Response/CommonResponseTrait.php on line 88; PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes) in /var/www/html/vendor/composer/ClassLoader.php on line 576" while reading response header from upstream, client: 10.0.2.43, server: _, request: "GET /admin/cluster/audit HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "elasticsearch-admin.elkprod.idtv.bc", referrer: "http://elasticsearch-admin.elkprod.idtv.bc/admin/cluster"

10.0.2.43 - - [09/Oct/2024:10:52:03 +0000] "GET /admin/cluster/audit HTTP/1.1" 500 5 "http://elasticsearch-admin.elkprod.idtv.bc/admin/cluster" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "10.0.0.26" 2.628 2.628 . -

NOTICE: PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/symfony/http-client/Response/CommonResponseTrait.php on line 88

NOTICE: PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes) in /var/www/html/vendor/composer/ClassLoader.php on line 576

2024/10/09 10:52:04 [error] 22#22: *28 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/symfony/http-client/Response/CommonResponseTrait.php on line 88; PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes) in /var/www/html/vendor/composer/ClassLoader.php on line 576" while reading response header from upstream, client: 10.0.2.52, server: _, request: "GET /admin/nodes HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "elasticsearch-admin.elkprod.idtv.bc", referrer: "http://elasticsearch-admin.elkprod.idtv.bc/admin/cluster"

10.0.2.52 - - [09/Oct/2024:10:52:04 +0000] "GET /admin/nodes HTTP/1.1" 500 5 "http://elasticsearch-admin.elkprod.idtv.bc/admin/cluster" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "10.0.0.26" 3.153 3.154 . -

NOTICE: PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/symfony/http-client/Response/CommonResponseTrait.php on line 88

NOTICE: PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/vendor/symfony/error-handler/Error/OutOfMemoryError.php on line 1

2024/10/09 10:52:08 [error] 22#22: *28 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/symfony/http-client/Response/CommonResponseTrait.php on line 88; PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/vendor/symfony/error-handler/Error/OutOfMemoryError.php on line 1" while reading response header from upstream, client: 10.0.2.52, server: _, request: "GET /admin/nodes HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "elasticsearch-admin.elkprod.idtv.bc", referrer: "http://elasticsearch-admin.elkprod.idtv.bc/admin/cluster"`

stephanediondev commented 1 month ago

Hi

For the audit and the nodes list, multiple requests are executed. I could check to limit the metrics instead of getting everything, but now the quickest solution is to increase the memory limit.

The Docker image is updated with memory_limit = 256M

If you have a manual installation, check your php.ini file