Error reading/writing files after some time.

I have 4 beaglebones with Debian and I have an process in node.js that write and read some files one of those files is an GPIO, it works fine but after a while I receive this error:
error: Unable to write to /sys/class/gpio/gpio112/value

And my process cannot do anything anymore, like connect by It is very strange and if I close de process and open again it works fine, if I wait for 30 60 minutes works fine as well.

It is a bit strange perhaps the process loses some reference from the linux. And this occur in all of the beaglebones.

uname -r