• Resolved Carl Gross

    (@carlgross)


    Hello. Your plugin has worked without issue on my site for about a year now. But I just updated from v2.28 to v2.31, and my home page (the page that displays my Photonic Instagram gallery) broke (screenshot). The page displays a PHP warning and a PHP error:

    Warning: require_once(/home/samuiink/public_html/wp-includes/Requests/Exception/Transport/cURL.php): failed to open stream: Too many open files in /home/samuiink/public_html/wp-includes/class-requests.php on line 146

    Fatal error: require_once(): Failed opening required '/home/samuiink/public_html/wp-includes/Requests/Exception/Transport/cURL.php' (include_path='.:/usr/local/php71/pear') in /home/samuiink/public_html/wp-includes/class-requests.php on line 146

    I reverted my site to a previous backup, so I unfortunately can’t do anymore troubleshooting right now. Any ideas?

    Also, I’m not sure why the PHP messages are printed to the screen. I have define( 'WP_DEBUG_DISPLAY', false ); set in wp-config.

    Thanks.

    • This topic was modified 5 years, 5 months ago by Carl Gross.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    There was a change done in 2.29/2.30 to handle Instagram carousels correctly. For this I use parallel processing of cURL requests (a.k.a. “multi cURL”), but this shouldn’t cause any issues as the number of photos in an Instagram stream always low. You might want to try checking with your hosting provider around their open file limit, and see if it can be bumped up. The only reason I suspect this would fail is if your host has a really low limit.

    Thread Starter Carl Gross

    (@carlgross)

    Thanks for the reply.

    >> but this shouldn’t cause any issues as the number of photos in an Instagram stream always low.

    On my page, there are only ~20-30 Instagram photos displayed.

    >> You might want to try checking with your hosting provider around their open file limit, and see if it can be bumped up.

    OK I can check with my hosting provider (SiteGround). But bumped up to what? Is there a minimum number that is important here?

    Thanks.

    Plugin Author Sayontan Sinha

    (@sayontan)

    OK I can check with my hosting provider (SiteGround). But bumped up to what? Is there a minimum number that is important here?

    There isn’t a minimum number that I am aware of. Best to ask your host about what the current limit is and decide accordingly.

    Multi-cURL requests have been in place for Flickr and Zenfolio for over a year now and this has never been reported as a problem (Flickr users of Photonic are considerably higher in number than Instagram). Also note that nowhere in the log is it being said Photonic is calling things improperly – it is likely that any plugin that uses multi-cURL will trigger this error on your server.

    Thread Starter Carl Gross

    (@carlgross)

    >> There isn’t a minimum number that I am aware of. Best to ask your host about what the current limit is and decide accordingly.

    OK I asked my host about my current open file limit. They said it is currently set to 10,000, which they said should be sufficient.

    >> Also note that nowhere in the log is it being said Photonic is calling things improperly

    OK I updated again. This time, the page was still broken, but there were no PHP messages printed to the screen. Only a message, “This site is experiencing technical difficulties.” (screenshots). I also checked the error log this time. All that was present was:

    [31-Oct-2019 09:45:11 UTC] PHP Warning: include(/home/samuiink/public_html/wp-content/advanced-cache.php): failed to open stream: No such file or directory in /home/samuiink/public_html/wp-settings.php on line 95

    >> it is likely that any plugin that uses multi-cURL will trigger this error on your server.

    OK. But as I mentioned, this error appears only after I updated Photonic from v2.28 to v2.31. Furthermore, I just updated again. This time, while the page was broken, I deactivated Photonic. The page then displayed with no issues.

    Thoughts on how to troubleshoot?

    Thread Starter Carl Gross

    (@carlgross)

    Hello. Is there any update to this issue?

    Plugin Author Sayontan Sinha

    (@sayontan)

    Sorry, I cannot fix what I cannot replicate, so there isn’t anything concrete I can help here with.

    I still maintain that this is a problem with your hosting (perhaps connections opened using multi-cURL are left open, causing a file limit problem). As I explained in the above, the only change I have made for Instagram between 2.28 and 2.31 is to facilitate handling of carousels, and while this relies on multi-cURL, to date I have only seen one user face an issue with a Flickr Collection in the past (and that person had several 100 collections in the parallel call).

    You can add a couple of lines to debug and see what errors come up as a result.

    1. Go to wp-content/plugins/photonic/Photonic_Instagram_Processor.php, line 280. You will see this:
      $responses = Requests::request_multiple($non_standard_search);
    2. Before the above line put in:
      print_r($non_standard_search);
    3. And after the current line 280, put in:
      print_r('Finished multi-cURL');

    Make sure you include the semi-colons and the correct quotes in the above, save the file and reload your page. See what shows up for the first print statement. If the first print statement shows a small array (< 10,000) but the second print still fails to execute, it is definitely a problem with your hosting, as it will point to them having multiple open connections.

    If your first print statement gives you an insanely high number of entries, let me know.

    Thread Starter Carl Gross

    (@carlgross)

    >> You can add a couple of lines to debug and see what errors come up as a result.

    OK I can try the debugging options. But before I do so I have a couple questions:

    1. Does the file wp-content/plugins/photonic/Photonic_Instagram_Processor.php exist in version 2.28? Or do I have to first update to version 2.31 before I can edit that file? Sounds like the latter–since I don’t see that file in version 2.28–but just want to be sure.

    2. Would it be OK to print $non_standard_search and Finished multicURL to the error log, instead of the screen?

    Thanks.

    Plugin Author Sayontan Sinha

    (@sayontan)

    1. Does the file wp-content/plugins/photonic/Photonic_Instagram_Processor.php exist in version 2.28? Or do I have to first update to version 2.31 before I can edit that file? Sounds like the latter–since I don’t see that file in version 2.28–but just want to be sure.

    You have to update to 2.31, but the file exists in both versions. I had provided the incorrect path in my previous post. The correct path is wp-content/plugins/photonic/extensions/Photonic_Instagram_Processor.php

    2. Would it be OK to print $non_standard_search and Finished multicURL to the error log, instead of the screen?

    It wouldn’t matter either way, since you will anyway get an error upon the invocation (all I am doing is adding a couple of print statements to get a better understanding of the error). I just want to know what the output is – you can delete the print statements after you have got the output.

    Thread Starter Carl Gross

    (@carlgross)

    OK stand by. Giving it a shot now…

    Thread Starter Carl Gross

    (@carlgross)

    OK I have an update. I was all set to update the plugin to v2.31, then add the debugging lines. When I updated, the plugins page displayed an error next to the Photonic plugin:

    Update Failed: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 504 Gateway Timeout Gateway Timeout The gateway did not receive a timely response from the upstream server or application.

    screenshot. But when I refreshed the Plugins page, the plugin appeared to have been updated to v2.31 (screenshot). Furthermore, the same front-end errors did not occur, nor did the PHP warnings about cURL that I previously experienced. I opened the home page in an incognito browser–that should clear all the relevant caches. So I guess I’m in the clear. Any ideas behind that Update Failed message?

    Just to be 100% sure I’m in the clear, is there a way to confirm that the front-end is loading with version 2.31 of the plugin? For example, can I look at any of the Photonic assets loaded by the page to confirm version 2.31 is loading, rather than version 2.28?

    Thanks!

    Plugin Author Sayontan Sinha

    (@sayontan)

    Just to be 100% sure I’m in the clear, is there a way to confirm that the front-end is loading with version 2.31 of the plugin? For example, can I look at any of the Photonic assets loaded by the page to confirm version 2.31 is loading, rather than version 2.28?

    You do have 2.31. There is no simple way for you to say so, but when I look at one of the JS files that Photonic includes, I do see a function over there that corresponds to something I released in 2.30.

    Thread Starter Carl Gross

    (@carlgross)

    OK thanks for checking that. Twenty-four hours later and no issues. So I guess we call this resolved.

    I really do appreciate your help. Your plugin is pretty feature rich, and usually a breeze to setup and maintain. I believe you that this issue was probably some freak unrelated issue, and was actually pretty curious to do the troubleshooting to see the actual culprit. But all’s well that ends well I guess.

    Actually one thing I neglected to say during this process was that the issue was present only on my live site, which is on SiteGround hosting. My local site (using Local by Flywheel) did not exhibit this issue. So maybe that lends more evidence that this was a web host issue.

    Anyway, let’s call this resolved–thanks again. I’ll leave a positive review for your plugin now.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Hi,
    I don’t know if you are subscribed to the forum as a whole, but there is likely to be a disruption to Instagram galleries being displayed with Photonic.

    This is mainly due to two items, both on Facebook’s end. First, they are discontinuing their legacy Instagram API and have asked developers to switch to a new API. While I have done this, FB requires that all apps go through an approval. Again, here I have managed to get an approval for Photonic. However, the second item here is that all individuals and businesses need to verify themselves, and while this takes 2-3 days according to them, due to COVID-19 they have decided to put my verification on hold after having it in the queue for 12 days. This is unlikely to get resolved soon, so I am anticipating that your Instagram galleries will stop working on 30th March.

    Sorry for this, but in the interest of continuity for your site I would suggest you move to another plugin. I have provided one in the link above.

    Thanks for considering Photonic for your needs all these days!

    Thread Starter Carl Gross

    (@carlgross)

    OK thanks very much for reaching out–I appreciate that. I’ll try to implement the temporary alternative.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Error after update to v2.31’ is closed to new replies.