redis-openshift-example icon indicating copy to clipboard operation
redis-openshift-example copied to clipboard

redis-server stops around 24 hours

Open bjjay opened this issue 12 years ago • 10 comments

Do you find this problem? I don't know why, redis-server process isn't existed, but the files redis.pid and redis.sock are still existed.

bjjay avatar May 02 '12 05:05 bjjay

I think is something related with memory. I'm currently investigating this problem with guys from openshift on freenode...

razorinc avatar May 03 '12 12:05 razorinc

Are there any updates on this issue? I'm very interested in deploying Redis with my application.

snitramodranoel avatar Jun 27 '12 14:06 snitramodranoel

No update on this issue, I guess.

bjjay avatar Jun 28 '12 09:06 bjjay

@snitramodranoel @bjjay I forgot to update the bug, i solved with a trivial cron job that check if the redis-server is running or not. But anyway, I think the openshift team is already working on a cartridge for redis :)

razorinc avatar Jul 08 '12 22:07 razorinc

Greet!

bjjay avatar Jul 09 '12 02:07 bjjay

Thanks for the tip. Anyways, there's a poll about a redis cartridge on the OpenShift community web site. Maybe you guys already know about it. Let's spread the word and ask for votes ;)

snitramodranoel avatar Jul 11 '12 16:07 snitramodranoel

@razorinc I suppose the issue is due to how OpenShift is implemented with SELinux. I'm not an OpenShift developer, but I bet this will only be solved for real when a redis cartridge is out. That's my two cents.

snitramodranoel avatar Jul 11 '12 16:07 snitramodranoel

@snitramodranoel Leonardo, I don't think is SELinux itself, but for sure, when the cartdrige will come out, would be way more easy to use it :) //cc @marekjelen

razorinc avatar Jul 13 '12 21:07 razorinc

Still no cartridge it seems. To add more details to @razorinc's answer.

Add cron cartridge to your app using procedure at https://openshift.redhat.com/community/blogs/getting-started-with-cron-jobs-on-openshift

script file in .openshift/cron/hourly/redis-check.sh containing #!/bin/sh kill -0 cat ${OPENSHIFT_RUN_DIR}/redis.pid || ${OPENSHIFT_DATA_DIR}/redis/bin/redis-server ${OPENSHIFT_DATA_DIR}/redis/bin/redis.conf

Then $ git add .openshift/cron/hourly/redis-check.sh $ git commit -a -m "add redis-server check cron job" $ git push origin

rw950431 avatar Sep 03 '12 00:09 rw950431

Corrected about script since Openshift fiddled with their enviroment variables see here

rw950431 avatar Nov 09 '12 00:11 rw950431