Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

subscribe.pl resource drain

Quote Reply
subscribe.pl resource drain
Heya,

I've tried to run subscribe.pl via cron to send out emails to the subscribers of my forums. for some reason when this script is running it completely drains my server resources. Has anyone else seen this? Any suggestions?

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] subscribe.pl resource drain In reply to
Hmmm, I'm having trouble with it myself although I'm not 100% sure what's going on.

I'm on a hosted Win2K package so I don't have all the access I need to be able to trouble shoot.

Host says the scheduled job runs. But yet no e-mails are forthcoming. I need a way to check to make sure subscribe.pl is working.

It is used for anything else besides the subscribed forum task?
Quote Reply
Re: [sangiro] subscribe.pl resource drain In reply to
I have encountered a drain like you described, and it stems from the subscribe code selecting all the recent posts and then using the top x (the subscribe max e-mails) rather than selecting just x posts. I've made this and several other optimizations in the subscription handling for 1.1.7 to fix this problem - try downloading the attached files (admin/GForum/Subscribe.pm and admin/cron/subscribe.pl) and see if it still drains system resources. Note that you will probably need to edit the "use lib" and GForum::init() lines in subscribe.pl if you download this.

subscribe.pl has a new option: -f. With this update (and thus 1.1.7) you can change your cron job to run:

/path/to/admin/cron/subscribe.pl -s -d -f "/path/to/admin/cron/subscribe.log"

It will enable debug mode and log the debugging into the file specified. This can help diagnose exactly where any problem and/or slowdown in the subscribing is happening. Don't leave the -d and -f options on permanently - they'll slowly fill up your drive and slow the subscription down a little bit.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] subscribe.pl resource drain In reply to
Jason,

Thanks for posting this. Are these fixes included in V 1.1.7? I'm upgrading to that this weekend and I'm hoping that this will be resolved in that version.

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] subscribe.pl resource drain In reply to
Yes, 1.1.7 includes these fixes.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com