Raspberry Pi with Arduino, Serial connection stops working This is the hardware set-up at home, 

Raspberry Pi GPIO -> Logic Level Converter -> Arduino -> Multiple Relays



I am running Raspbian and NodeJS on the Pi while the Arduino is loaded with StandardFirmata.
I connect NodeJS to the Arduino with the johnny-five package and it works well after it's started. But after extended periods, a few hours? The Arduino stops responding. Whatever command that I send to the Arduino won't be acted on. It's as though as the Arduino hung.
Both the Raspberry Pi and Arduino are being powered indenpendently with a 1A Nokia USB Adapter.

Does anyone know why this is happening?


johnny-five
StandardFirmata
NodeJS Server Code
If none of the code is yours, and all code from the Firmata library, then the most possible cause that comes to mind after reviewing the library code is memory leak, which makes the next allocation to fail and by thus breaking the code. 

The Firmata library does perform dynamic memory allocation, checkout Firmata.c, so it is realistic - I would suggest to take it with the Library's author.