2

Laravel: 5.5 Horizon: 1.2.3 php: 7.2 ubuntu: 16.04, LAMP

I don't know if this issue is related to redis server of horizon, but what I'm sure that this happens. When using database driver the /tmp starts to fill with tmp php files with pattern like this php34gs1 phpwrd42 after the queue is processed the /tmp is cleaned and reverted.

However when I use redis driver with horizon the /tmp directory is filled untill my my 60GB server is full and I only resolve this either by deleting them manual from cli or worse to reboot server.

Disk usage with redis driver:

Disk usage with redis driver

Disk usage with database driver:

Disk usage with database driver

php files sample:

php files sample

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
Yamen Ashraf
  • 121
  • 1
  • 4

1 Answers1

0

Till now I can't solve this or know why it happens, but there is a work around to install a cron job to clean /tmp directory.

The cron job will delete any file that is older that one day and will run daily at midnight.

By running crontab -e and paste the following:

0 0 * * * sudo find /tmp -type f -atime +1 -delete

Yamen Ashraf
  • 121
  • 1
  • 4