Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mstnorris's avatar

cannot create temp file for here-document: No space left on device

Weird error.

I cannot add a new site, push-to-deploy an existing site, or navigate anywhere while SSH'd into the server. I receive this message when I try to do anything:

cannot create temp file for here-document: No space left on device

I had this issue last week (I was using the $20 per month DO box, and I couldn't find extra files anywhere). In any case, I have $15,000 in credit with AWS so I set up a t2.large instance on EC2 and have added four sites. I tried to add the fifth this morning, but Forge just got stuck. I now realise that I am up against a similar issue although I KNOW FOR SURE this time that it doesn't have anything to do with space as I'm now on a $80 per month server and haven't even begun to use it yet.

Can someone please help as I am at a loss and don't have all that much experience on the server side of things (a reason I went with Forge in the first place).

0 likes
5 replies
ohffs's avatar

If you can run df -h and df -i that might show up where the problem is. You might be out of inodes rather than disk "space".

mstnorris's avatar

I've narrowed it down, when I set up beanstalkd as a queue worker it just spits out rubbish (I assume it isn't rubbish) to the laravel.log file. The file that was taking up 19GB of space was the storage/logs/laravel.log.

Beanstalkd

The queue workerisn't even doing anything as I just deleted it, cleared the logs, and set it up again (beanstalkd), but the moment it starts, it starts appending stuff to the log file at a rate of about 500KB per second so it will fill up my server in approximately 11 hours!

I have no idea what is going on but can only assume that it is this that clogged up my DO box in the first place, which prompted the switch to EC2.

ohffs's avatar

Ah - fun times! ;-) If there's nothing confidential in the output can you post some of the beanstalk stuff that's in the logs?

mstnorris's avatar

I don't think there was anything confidential in there. However, there was a glaring error on my part...

I didn't have pda/pheanstalk ~3.0 in my dependencies, they were there but I must have deleted them by mistake when I removed some unused packages a few weeks ago.

I couldn't open the log file as it was too big, so it was only upon deleting it and restarting the queue worker and catching the log file while it was small enough to open, was I able to get to the bottom of it.

Anyhow, lesson learnt.

Thanks for your time. If you want to submit an answer to the effect of adding "pda/pheanstalk": "~3.0" to my composer.json file then I'll mark it as accepted.

ohffs's avatar
ohffs
Best Answer
Level 50

Heh - I've done much the same thing myself :-)

adding "pda/pheanstalk": "~3.0" to my composer.json file

1 like

Please or to participate in this conversation.