Multiple bugs probably relating to event plugins
Multiple bugs probably relating to event plugins
After the upgrade from 0.9whatever to 1.0 beta1 a month or so ago, I began noticing some problems with posting entries. I did some searching, but didn't see anyone else having this problem, but I always have problems searching these forums, so it might just be me. Sorry if this has been addressed.
First off, when posting an entry that contains a media file such as a video or mp3, none of the event plugins in the list get executed. It used to give a message saying the file was too large to trackback or whatnot, but would then proceed to execute the event plugins. Now it apparently stops and there are no status messages whatsoever. It just doesn't do anything after that(such as posting to livejournal, pinging google, etc). Curiously, when this happens, the area that normally shows the status messages now contains the front page of my blog.
Secondly, I've found that without a media file included it takes MUCH longer to go through all the event plugins than it used to. It now takes at least a minute, often more to actually post the entry. During the time it is doing its thing, I am unable to load existing entries on the site.
Thirdly, and I can't tell if this is related to an event plugin or what, but whenever I try to add media using the media button, it takes at least 2 minutes for that window to load. During that time, the blog is inaccessable by me, and I'm asssuming everyone else as well.
Thanks for any help you can give me, and I'm sorry that I'm unable to pinpoint the problems more than this.
First off, when posting an entry that contains a media file such as a video or mp3, none of the event plugins in the list get executed. It used to give a message saying the file was too large to trackback or whatnot, but would then proceed to execute the event plugins. Now it apparently stops and there are no status messages whatsoever. It just doesn't do anything after that(such as posting to livejournal, pinging google, etc). Curiously, when this happens, the area that normally shows the status messages now contains the front page of my blog.
Secondly, I've found that without a media file included it takes MUCH longer to go through all the event plugins than it used to. It now takes at least a minute, often more to actually post the entry. During the time it is doing its thing, I am unable to load existing entries on the site.
Thirdly, and I can't tell if this is related to an event plugin or what, but whenever I try to add media using the media button, it takes at least 2 minutes for that window to load. During that time, the blog is inaccessable by me, and I'm asssuming everyone else as well.
Thanks for any help you can give me, and I'm sorry that I'm unable to pinpoint the problems more than this.
-
Brendon K
- Regular
- Posts: 44
- Joined: Thu Feb 23, 2006 10:35 pm
- Location: Saratoga Springs, NY, USA
- Contact:
I've personally noticed that the trackbacks take quite some time to do their dirty work, presumably because it's a much more advanced pinging service than most other blogs... I unfortunately am not lucky enough to have tried the v0.9 series of Serendipity.
Try removing/disabling plugins dealing with trackback and pinging and see if it speeds up (temporarily of course, as a test).
Try removing/disabling plugins dealing with trackback and pinging and see if it speeds up (temporarily of course, as a test).
They say, "Practice makes perfect," yet they also say, "Nobody's perfect." I don't get it.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
The problem is that we recently switched to using the PEAR HTTP::Request class for fetching trackbacks.
Those functions fetch every link to parse it for possible trackbacks, and they might exceed a certian filesize easily. I have not yet had the time to checkout the PEAR class to see how it can be made to stop getting a file after a specific file size, but will try to do you in the near future.
Your problem seems that the memory runs over and the complete page cannot be completed, thus also not executing any plugins after the trackback...
Best regards,
Garvin
Those functions fetch every link to parse it for possible trackbacks, and they might exceed a certian filesize easily. I have not yet had the time to checkout the PEAR class to see how it can be made to stop getting a file after a specific file size, but will try to do you in the near future.
Your problem seems that the memory runs over and the complete page cannot be completed, thus also not executing any plugins after the trackback...
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Perhaps you could just check the file extension of whatever is to be pinged against a list of extensions we know won't respond to the trackback (like audio formats, video formats, spreadsheets, etc)?
Or better yet, if it has an extension that isnt .htm .html .php .asp or whatnot, don't even bother to try?
Or better yet, if it has an extension that isnt .htm .html .php .asp or whatnot, don't even bother to try?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
That is a very good suggestion!
I added this code snippet to include/functions_trackbacks.inc.php at line 194, before the require_once S9Y_PEAR_PATH . '/HTTP/Request.php':
I think I got all common files; I'd rather make a blacklist instead of a whitelist to prevent forgetting important valid URL names like .phtml or so.
I'll still try to look into the Net_URL/HTTP:Request problem to be able to specify how many bytes to fetch.
Regards,
Garvin
I added this code snippet to include/functions_trackbacks.inc.php at line 194, before the require_once S9Y_PEAR_PATH . '/HTTP/Request.php':
Code: Select all
if (preg_match('@\.(jpe?g|aiff?|gif|png|pdf|doc|rtf|wave?|mp2|mp4|mpe?g3|mpe?g4|divx|xvid|bz2|mpe?g|avi|mp3|xl?|ppt|pps|xslt?|xsd|zip|tar|t?gz|swf|rm|ram?|exe|mov|qt|midi?|qcp|emf|wmf|snd|pmg|w?bmp|gcd|mms|ogg|ogm|rv|wmv|wma|jad|3g?|jar)$@i', $u['path'])) {
echo '<div>• ' . TRACKBACK_NO_DATA . '</div>';
return;
}
I'll still try to look into the Net_URL/HTTP:Request problem to be able to specify how many bytes to fetch.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
fixes
Just as an update, my last concern was the amount of time it takes to load the media insertion window. I figured maybe the fact that I was storing lots of video files in there as well was slowing things down, so I moved them all out of there. Now it works perfectly.
I'm not sure why they would mess anything up, as I was under the impression that only 'rebuild thumbs' did any kind of processing of them, but it did.
So, if you're storing large files in the same directory as your images: don't. It will bite you in the butt eventually.
Luckily for me .htaccess rules made this trivial, so moving them was no problem at all.
I'm not sure why they would mess anything up, as I was under the impression that only 'rebuild thumbs' did any kind of processing of them, but it did.
So, if you're storing large files in the same directory as your images: don't. It will bite you in the butt eventually.
Luckily for me .htaccess rules made this trivial, so moving them was no problem at all.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: fixes
Hm, the large files should really not matter. Which s9y version were you using?
Can you tell me how many and how large the files were you stored therE? Then I could try to reproduce it...
Regards,
Garvin
Can you tell me how many and how large the files were you stored therE? Then I could try to reproduce it...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
here's the complete list of files I removed:
I noticed it getting progressively sluggishier as I added each of the Spaced files.
Code: Select all
total 1.7G
-rw-r--r-- 1 jerwarren pg233686 164M 2005-11-14 18:53 06 - Mom E DEA Arrest.avi
-rw-r--r-- 1 jerwarren pg233686 164M 2005-12-10 20:03 08 - Fare Thee Wellfare.avi
-rw-rw-r-- 1 jerwarren pg233686 5.6M 2005-05-08 21:14 AnneFrank.avi
-rw-r--r-- 1 jerwarren pg233686 7.1M 2005-12-10 20:39 Freedom.avi
-rw-r--r-- 1 jerwarren pg233686 6.1M 2005-12-16 12:29 JesusMiracles.avi
-rw-rw-r-- 1 jerwarren pg233686 12M 2005-04-17 17:24 KillBunny.avi
-rw-rw-r-- 1 jerwarren pg233686 8.0M 2005-04-26 19:03 Passion2.avi
-rw-r--r-- 1 jerwarren pg233686 1.7M 2006-01-06 10:18 Spaced.s01.e01.clip.avi
-rw-r--r-- 1 jerwarren pg233686 177M 2006-01-06 10:01 Spaced.s01.e01.dvdrip.xvid-mog.avi
-rw-r--r-- 1 jerwarren pg233686 175M 2006-01-06 10:00 Spaced.s01.e02.dvdrip.xvid-mog.avi
-rw-r--r-- 1 jerwarren pg233686 176M 2006-01-06 10:00 Spaced.s01.e03.dvdrip.xvid-mog.avi
-rw-r--r-- 1 jerwarren pg233686 176M 2006-02-13 17:28 Spaced.s01.e04.dvdrip.xvid-mog.avi
-rw-rw-r-- 1 jerwarren pg233686 175M 2006-02-13 17:29 Spaced.s01.e05.dvdrip.xvid-mog.avi
-rw-rw-r-- 1 jerwarren pg233686 159M 2006-02-13 22:18 Spaced.s01.e06.dvdrip.xvid-mog.avi
-rw-rw-r-- 1 jerwarren pg233686 176M 2006-02-13 17:29 Spaced.s01.e07.dvdrip.xvid-mog.avi
-rw-r--r-- 1 jerwarren pg233686 61M 2005-11-13 19:36 beacon.avi
-rw-r--r-- 1 jerwarren pg233686 2.0M 2005-10-07 13:31 blast.avi
-rw-rw-r-- 1 jerwarren pg233686 789K 2005-09-25 16:38 cards_small.avi
-rw-rw-r-- 1 jerwarren pg233686 6.2M 2005-06-17 16:51 demo.avi
-rw-rw-r-- 1 jerwarren pg233686 2.3M 2005-05-30 18:22 juggling.avi
-rw-r--r-- 1 jerwarren pg233686 17M 2005-11-29 21:46 leanne.avi
-rw-r--r-- 1 jerwarren pg233686 14M 2005-12-28 11:46 mouse.avi
-rw-r--r-- 1 jerwarren pg233686 5.2M 2005-12-28 11:46 mouse2.avi
-rw-rw-r-- 1 jerwarren pg233686 1.8M 2005-09-14 21:36 onehandshuffle.avi
-rw-r--r-- 1 jerwarren pg233686 15M 2005-10-13 21:03 out.avi
-rw-r--r-- 1 jerwarren pg233686 3.4M 2005-09-30 15:37 shuffle2.avi
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Which serendipity version are you using? Maybe 1.1 alpha? This one contains synchronization code that can choke on learge files...
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I think the culprit is the PHP getimagesize() call which seems to try to access the whole file. Which is a bad thing of course, so I'm now looking into this. 
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/