Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Wednesday, May 22 2013 @ 07:53 PM EDT


 Forum Index > Support > General Geeklog Support New Topic Post Reply
 Unable to aquire feed reader
   
::Ben
 08/24/11 11:26AM (Read 1115 times)  
+++++
Full Member

Status: offline


Registered: 01/14/05
Posts: 1359
Is there a way to set a timeout limit for feed aquisition on portal block ?

The feed I was trying to aquire was not available and the portal block freezed my geeklog site.

Ben

We speak french on http://geeklog.fr
 
Profile Email Website
 Quote
Laugh
 08/26/11 08:45PM  
AAAAA
Admin

Status: offline


Registered: 09/27/05
Posts: 876
I looked at the code and it doesn't look like we allow a way to set a timeout. This should be done and we should probably update the code to use HTTP_Request2.

Look in the paserfactory.class.php file at the _getFeed function (line 180). Change the line 182 to

PHP Formatted Code

$req = new HTTP_Request($url, array('allowRedirects' => true, 'readTimeout' => 2));
 


This should set it to timeout at 2 seconds. I haven't tested this but let me know if it works.

For more information on this pear library you can also look at:

http://pear.php.net/package/HTTP_Request/docs/latest/HTTP_Request/HTTP_Request.html

Tom

 
Profile Email Website
 Quote
::Ben
 08/27/11 03:35AM  
+++++
Full Member

Status: offline


Registered: 01/14/05
Posts: 1359
Tom,

Thanks for the tip.: I don't know if it works because the feed I needed is now fully available, but yes it can be a nice feature to avoid complete site freeze.

Ben

We speak french on http://geeklog.fr
 
Profile Email Website
 Quote
cokee88
 10/19/11 04:44PM  
+----
Newbie

Status: offline


Registered: 09/14/11
Posts: 4
Thank you for this easy tip. I will also apply this method to solve the issues.

 
Profile Email
 Quote
Content generated in: 0.63 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content