OpenHAB/Raspberry stops working after 2-3 weeks running

Yes, I assume you use the released version. This have a memory leak if the internet connection is down. Please use my beta version from here or upgrade to the openhab 2.5 beta.