hashtopolis / server

Hashtopolis - distributed password cracking with Hashcat
GNU General Public License v3.0
1.42k stars 212 forks source link

[BUG]: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted #1051

Open tosiara opened 5 months ago

tosiara commented 5 months ago

Version Information

0.14.2 commit f4fc2b1

Hashcat

No response

Description

Upgraded from 0.12 to the latest master (build docker from sources) When navigating to Tasks, page spins for ~5 seconds and then gives blank screen. Logs contain this:

hashtopolis-backend     | [Sun Mar 24 16:37:53.919486 2024] [php:error] [pid 53] [client 192.168.0.72:43800] 
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted 
(tried to allocate 20480 bytes) in /var/www/html/src/dba/Util.class.php on line 24

Adding ini_set("memory_limit", "2G"); to the Util.class.php file resolves the issue.

Would be great to have max memory value configurable through docker env

zyronix commented 5 months ago

Workaround: you can add a custom php.ini to the docker volume and mount that over /usr/local/etc/php/conf.d/custom.ini

services:
  hashtopolis-backend:
    container_name: hashtopolis-backend
    image: hashtopolis/backend:latest
    restart: always
    volumes:
      - hashtopolis:/usr/local/share/hashtopolis:Z
      - somelocalpath/myphp.ini:/usr/local/etc/php/conf.d/custom.ini:Z

But I understand that having some customization over some critical settings is prefered.