parser_simplepie fails to refresh a feed with the following error:

warning: fsockopen() [function.fsockopen]: unable to connect to 1:80 (Invalid argument) in /var/drupal/cvs/contributions/modules/feedapi/parser_simplepie/simplepie.inc on line 6601.

a print_r($feed) at the beginning of _parser_simplepie_feedapi_parse reveals indeed that $feed->url = 1

Comments

aron novak’s picture

Status: Active » Postponed (maintainer needs more info)

1) Have you tried out the automated tests: http://drupal.org/node/200037 ?
2) Please supply an example URL to reproduce the problem!
3) Is it a general problem or just for one of the feed urls? What about parser common syndication?

mustafau’s picture

I have the same problem.

"FeedAPI Node basic functions" test result is "20 passes, 5 fails and 4 exceptions". When parser common syndication is enabled the result is "17 passes, 8 fails and 10 exceptions".

I do not know which of the URLs are responsible. I was trying to import an OPML file which has nearly 1.000 feeds. Everytime a different feed caused this problem or a timeout appeared.

I am using PostgreSQL 8.2.5

Test results are attached.

mustafau’s picture

Also the following error appears everytime I refresh a feed.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 143891953 bytes) in /home/mustafau/workspace/drupal-5.5/sites/localhost.feedapi/modules/feedapi/parser_simplepie/parser_simplepie.module on line 63

alex_b’s picture

Hi,

I am having this memory problem also when working on installations with many feeds to process. Can you jack up the limit to 256MB?

ie. add this to the bottom of your settings.php

ini_set(”memory_limit”,”256M”);

once the script does not time out anymore, does the url =1 error still occur?

mustafau’s picture

That solved the memory issue however I can not reproduce the "url = 1" error anymore although I tried before and after setting memory limit to 256M.

Watchdog entries for last night shows that two feeds (one from Blogger and one from Feedburner) which I manually tried to refresh were giving "url = 1" errors.

This is how watchdog entry looks like:

fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 1:80 (Invalid argument) in /home/mustafau/workspace/drupal-5.5/sites/localhost.feedapi/modules/feedapi/parser_simplepie/simplepie.inc on line 6601.

mustafau’s picture

I reproduced "url = 1" error.

It occurred when I manually refresh a feed which is newly created using the simplified form. However it only appears at first use of the form after logging in to the site. Weird behavior.

alex_b’s picture

Interesting... I tried out the following, but could not reproduce:

1 Log out
2 Log in
3 Create feed immediately after log in with quick add form
4 Refresh feed

Everything works as expected.

I am using PHP 4 here.

Could you add the following debug output to the first line of feedapi_simplified_form($form_id, $form_values) and post its output here?

drupal_set_message('<pre>'. print_r($form_values, true) '</pre>');

Thank you

mustafau’s picture

I added your code to the first line of feedapi_simplified_form_submit($form_id, $form_values).

The output is:

Array
(
    [node] => Array
        (
            [type] => feedapi_node
        )

    [url] => http://zaman.com.tr/politika.rss
    [op] => Add
    [submit] => Add
    [form_token] => 9a25e8de5951634586e11865cf2a6790
    [form_id] => feedapi_simplified_form
)
aron novak’s picture

This output seems to be exactly the same what I get when i use the debugger and submit the simplified form (and getting no error). Is this such an output when the form behaved badly? Anyway, can you reproduce this when you use common syndication parser ?
Thanks for your efforts.

mustafau’s picture

This output was given when the form behaved badly. I will try common syndication parser later.

mustafau’s picture

Using the latest development snapshot of SimplePie (http://svn.simplepie.org/simplepie_latest.tar.gz) I did not experience this error.

tomdeb’s picture

Assigned: Unassigned » tomdeb
Status: Postponed (maintainer needs more info) » Closed (fixed)

I can't reproduce this error with current beta , closing.