Skip to content

wrapper.js crashes when /var/log runs out of space #17

Open
@RazZziel

Description

@RazZziel

My program crashed when launched from a /etc/init.d/ script created by node-linux

This is the error, from /var/log/parkberry-error.log:

Wed Apr 01 2015 15:44:17 GMT+0200 (CEST) - SVCMGR - Uncaught exception: Error: ENOSPC, no space left on device
    at Object.fs.writeSync (fs.js:540:18)
    at Object.fs.writeFileSync (fs.js:987:21)
    at Object.fs.appendFileSync (fs.js:1024:6)
    at Socket.<anonymous> (/home/pi/node_modules/package/node_modules/node-linux/lib/wrapper.js:155:8)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:765:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:427:10)
    at emitReadable (_stream_readable.js:423:5)
    at readableAddChunk (_stream_readable.js:166:9)

Indeed, /var/log is full, and my program is to blame, but if node-linux is in charge of creating the log, it should be in charge or splitting/rotating it

pi@0000000023593fb2 /var/log $ df -h
Filesystem      Size  Used Avail Use% Mounted on
(...)
tmpfs           100M  100M     0 100% /var/log
(...)

pi@0000000023593fb2 /var/log $ du -sh parkberry.log 
100M    parkberry.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions