icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » All Things Techy » Site Maintenance » Sessions in Rails

Site Maintenance Program updates, securing your website, creating backups.

Reply
 
LinkBack Thread Tools Search this Thread
Old August 29th, 2005, 2:30 AM   #1 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2004
Lives in San Francisco
364 posts
Gave thanks: 0
Thanked 3 times
Sessions in Rails

This code needs to be run, either every hour or five hours or 12 hours or day, to clear out old Rails sessions.
Code:
find /tmp/ -name "ruby_sess*" -cmin +60 -exec rm \{} \;
The default session mechanism in Rails creates a temporary file in /tmp/ called ruby_sess.* with no expiration. While you can set an expiration time for sessions in your Rails app, some of the sessions still might hang around in /tmp/ forever, eventually bogging things down.

Since we should probably assume that a lot of our users aren't going to know how to set a session expiration right when they start out, the admins might want to run a cron job which will clear out old sessions periodically. ls /tmp any time to see what I mean. Yeah, it's all from me, but still! =)
ghostcop is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 29th, 2005, 2:33 AM   #2 (permalink)
System Administrator
On a golden path...
 
Paul's Avatar
 
Joined in Jul 2004
356 posts
Gave thanks: 2
Thanked 73 times
They are cleaned automatically already Just maybe a too long a expiration
Paul is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 29th, 2005, 2:50 AM   #3 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2004
Lives in San Francisco
364 posts
Gave thanks: 0
Thanked 3 times
Great! Honestly, I didn't really check the expiration time very hard. I kinda assumed it wasn't going on, so my bad. Thanks again for the great new plan.
ghostcop is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 30th, 2005, 2:02 AM   #4 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2004
Lives in San Francisco
364 posts
Gave thanks: 0
Thanked 3 times
Hey, I have a few RubyGem requests:

- RedCloth
- syntax
- rubyzip
ghostcop is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 30th, 2005, 2:04 PM   #5 (permalink)
System Administrator
On a golden path...
 
Paul's Avatar
 
Joined in Jul 2004
356 posts
Gave thanks: 2
Thanked 73 times
You may put any requests into /home/$username/gemrequest. This file will be read when I run my update script every day and I will select Accept or Deny, If Isee it coming from you I shall accept

Just put them in the file seperate by newline
Paul is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 30th, 2005, 2:04 PM   #6 (permalink)
System Administrator
On a golden path...
 
Paul's Avatar
 
Joined in Jul 2004
356 posts
Gave thanks: 2
Thanked 73 times
Forgot to mention I Installed them 3 for you
Paul is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 31st, 2005, 9:33 PM   #7 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2004
Lives in San Francisco
364 posts
Gave thanks: 0
Thanked 3 times
Thanks so much, you're too good to me =)
ghostcop is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 18th, 2005, 4:25 AM   #8 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2004
Lives in San Francisco
364 posts
Gave thanks: 0
Thanked 3 times
Quote:
Originally Posted by PaulTech
You may put any requests into /home/$username/gemrequest. This file will be read when I run my update script every day and I will select Accept or Deny, If Isee it coming from you I shall accept

Just put them in the file seperate by newline
How often do you check gemrequest? And how do I know that it's been checked, but my gem request was rejected?
ghostcop is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 18th, 2005, 4:09 PM   #9 (permalink)
System Administrator
On a golden path...
 
Paul's Avatar
 
Joined in Jul 2004
356 posts
Gave thanks: 2
Thanked 73 times
They run Sunday morning, Actually just ran not too long ago and I only see One request that was accepted as a valid gem.

"Rubilicious-0.1.5"
Paul is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On