Sudden error in S9y backend: no more admin functions (v.1.21

Having trouble installing serendipity?
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

Re: Sudden error in S9y backend: no more admin functions (v.

Post by hgoor »

garvinhicking wrote:Hi!

I need to check with jannis why the blog is down.

Sadly, PHP is VERY unforgiving when network stuff fails, there is often no way to catch those fatally network routing errors, because often PHP bails out due to timeout issues completely. I have no solution to that; detecting "down" sites is something thatI don't know how to do properly with PHP, or if it's even possible.

The only thing that could be done is to create a "fatal error" counter. Store a DB configuration value when the feed was last tried to be accessed, and reset that counter when the connection is made successfully. Then on the next run, the tool could detect a "non zero" counter and check it against the current timestamp. If it's older than, say 5 minutes, the plugin could be temporarily disabled for that site...?

Regards,
Garvin
Garvin,

You know what is really weird: in the past I have had another external RSS feed that was down, but then it just showed an error there and I just could ignore it till the feed was up again. I still had all Admin menu items there....

Maybe because this was the last feed?

The feed that did not work before was somewhere in the middle....

That's why it NEVER occured to me that this was due to a feed being down...
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Sudden error in S9y backend: no more admin functions (v.

Post by garvinhicking »

Hi!

Jannis told me that blog.s9y.org is down due to the power outage of a huge german provider yesterday (12.000 servers affected). We now need to wait for them to reboot the machine.
You know what is really weird: in the past I have had another external RSS feed that was down, but then it just showed an error there and I just could ignore it till the feed was up again. I still had all Admin menu items there....
Yeah, the problem is the difference in the type of network connections. When a server is "down", there can be multiple reasons:

It can timeout (not return anything), it can be simply not be listening on the given port (like 80) and thus immediately reply "there's nothing here" or the DNS can be down so that no IP can be resolved (which also immediately gives an error that can be evaluated).

Mostly the first error is the hardest to catch: The server plays as if it would answer, but it doesn't, resulting in X seconds of inactivity that can stall the whole page.

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I've just spent some time looking for a better answer. I can't find a PHP parser for RSS feeds that's still supported. Both Onyx and Magpie appear to be abandoned. That leaves writing my own. *shudder*

I hate this problem. Wasn't HTTP_Request supposed to take care of all this error handling for us? Grumble, grumble...
Judebert
---
Website | Wishlist | PayPal
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

Post by hgoor »

judebert wrote:I've just spent some time looking for a better answer. I can't find a PHP parser for RSS feeds that's still supported. Both Onyx and Magpie appear to be abandoned. That leaves writing my own. *shudder*

I hate this problem. Wasn't HTTP_Request supposed to take care of all this error handling for us? Grumble, grumble...
Ok, but how come that when I use RSS feeds in the front-end it does not kill S9y? Just the backend?
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Judebert!

Try simplepie. However, just replacing Onyx with something else is hard, as there are many dependencies and many plugins that specifically hook with Onyx in Serendipity.
I hate this problem. Wasn't HTTP_Request supposed to take care of all this error handling for us? Grumble, grumble...
Yeah, but because the problem is one level above PHP-Scripts (with PHP at its C-level) there's little to achieve with any PHP library...

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

hgoor wrote:Ok, but how come that when I use RSS feeds in the front-end it does not kill S9y? Just the backend?
Do you use the same feeds in the frontend? I can easily imagine some errors being caught and handled by the Onyx RSS library, while others cause fatal exceptions that stop the script.

If you are using the offending feed in the frontend, I'll definitely want to look at that code and see what's being done differently.
Judebert
---
Website | Wishlist | PayPal
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

Post by hgoor »

judebert wrote:
hgoor wrote:Ok, but how come that when I use RSS feeds in the front-end it does not kill S9y? Just the backend?
Do you use the same feeds in the frontend? I can easily imagine some errors being caught and handled by the Onyx RSS library, while others cause fatal exceptions that stop the script.

If you are using the offending feed in the frontend, I'll definitely want to look at that code and see what's being done differently.
No I was talking in general: I use 1 feed currently in my frontend:
(http://www.digitalrendezvous.net). It has been down in the past but it never killed my Blog.

Off course it's the FRONT-end RSS plugin, but I assume it uses the same library??

Testing this should be simple:

Add the front-end RSS (or back-end RSS for that matter) to your blog and point the feed to the currenttly down feed of blog.s9y.org and see what happens (in 1.4.1 as well)...
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
Post Reply