• Resolved markamp

    (@markamp)


    Hi,

    how long does/should it take to cache boards, save pins etc.?

    I started using your plugin this day at around 12 am. As im writing this your plugin cached all my boards (201) and saved 430 pins. But during the day it’s getting slower and slower. My Apache is busy all the time (90% +) and just changing a tab (from “Import Pins” to “Board Settings”) lasts for minutes (> 10 for the last try). Do you know this behavior?

    My environment:

    – lamp on a local machine
    – a fresh wp 4.2.2
    – my pinterest account: 200 boards and 4000 pins

    Because of “Fatal error: Maximum execution time of 30 seconds exceeded” i adjusted my php.ini.

    Many thanks for this plugin! I looked for something like this for over one year! It’s great …. and it would be heaven if i could solve my performance problems πŸ™‚

    Marc

    https://wordpress.org/plugins/pinterest-importer/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author grosbouff

    (@grosbouff)

    @markamp

    Great to know that you like the plugin !
    About your performance issue, I never try to import so much boards and pins (I have about 10 boards and 1000 pins); maybe the cache is too big.
    You could try to cache not everything but in several steps (eg. 10 boards at a time).
    Also, did you click several times the cache button ?
    It is possible that each time you click the button, the cache process runs – even if you stop and reload the page.
    I’m interested in having your feedback here…
    Good luck !

    Thread Starter markamp

    (@markamp)

    @grosbouff

    Thanks a lot for your quick reply.

    First i chached all pins shown under “needs cache refresh”. I did this in several steps. And with every single step using your interface was getting slower. So i guess you’re right with “maybe the cache is too big”.

    Today i choosed another workflow on a wordpress installation hosted by a provider:

    1) Under “needs cache refresh” i pressed “Cache All Pins”. This works well and quick
    2) Then i tried to import some pins shown in “pended”

    But with this wordpress installation i always get “Error while setting post thumbnail: https://s-media-cache-ak0.pinimg.com/…..jpg”.

    The posts are created but the images are missing.

    I disabled all plugins and choosed “Twenty Fifteen” as theme but no chance: it doesn’t import a single image

    Any idea?

    In the evening i will give it another try with my first environment. More feedback tomorrow ….

    Marc

    Thread Starter markamp

    (@markamp)

    @markamp πŸ˜‰

    1) set “define(‘WP_DEBUG’, false);” to “true” πŸ˜‰
    2) now i get

    [11-May-2015 08:26:08 UTC] PHP Warning: getimagesize(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in .../pinterest-importer/pinim-functions.php on line 143

    [11-May-2015 08:26:08 UTC] PHP Warning: getimagesize(https://s-media-cache-ak0.pinimg.com/originals/70/d1/2a/70d12aac9eed49c20ac74afe7bc62b88.jpg): failed to open stream: no suitable wrapper could be found in .../plugins/pinterest-importer/pinim-functions.php on line 143

    3) i can’t set “php_value allow_url_fopen On” as this is not allowed by my provider πŸ™

    just to let you know….

    Thread Starter markamp

    (@markamp)

    3) i can’t set “php_value allow_url_fopen On” as this is not allowed by my provider πŸ™

    i can’t do it in my “.htaccess” …. but in the backend given to me by my provider! Now it works πŸ™‚

    Plugin Author grosbouff

    (@grosbouff)

    @markamp :

    Thanks for the feedback.
    I will check if I can do something for this, at lease warn users about functions that needs to be enabled by the provider.
    So you don’t have performances issues anymore ?

    Thread Starter markamp

    (@markamp)

    So you don’t have performances issues anymore ?

    The performance issues are still a topic. But i try to split the import into parts that doesn’t slow down the plugin too much …

    Plugin Author grosbouff

    (@grosbouff)

    The plugin do not uses getimagesize anymore.
    The performances could be improved; tell me if you see something !

    Thread Starter markamp

    (@markamp)

    Difficult to say. Felt a little bit faster and problems occur later!

    After caching nearly half of my pins i get “Fatal error: Maximum execution time of 60 seconds exceeded in …/plugins/pinterest-importer/pinim-tool-page.php on line 1082” messages. As i’m importing from a hosted wordpress this time i can’t increase “max_execution_time”.

    Will try again from a local lamp….

    Plugin Author grosbouff

    (@grosbouff)

    This is weird as this occurs when then scripts try to get cache information.
    Should not be so slow, but I didn’t change anything there.

    Again, all this process is heavy (and can only be heavy), that why the plugin has been designed to allow selecting not all the boards or pins at the same time.

    Try caching not all at once.
    I would say you can fill the cache in several steps (no need to clear it) before importing pins, so you could try this.

    Another solution would be to temporary add this

    set_time_limit(60); //or an higher value

    just above

    /* That’s all, stop editing! Happy blogging. */

    in wp-config.php.
    It should increase the time the script is allowed to run.

    I could maybe add this in the plugin later, but I prefer not messing up with this kind of stuff for the moment.

    Plugin Author grosbouff

    (@grosbouff)

    I have a doubt on a part of the code.
    You can try this if you want :

    In pinim-board-class.php on line 231, replace

    if(isset($all_queues[$this->board_id]['pins'])){
                $existing_pins = $all_queues[$this->board_id]['pins'];
            }

    with

    if( isset($all_queues[$this->board_id]['pins']) && ($all_queues[$this->board_id]['bookmark']!='-end-') ){
                $existing_pins = $all_queues[$this->board_id]['pins'];
            }

    Tell me if it changes something for u (before trying to edit wp-config.php as proposed in previous message)

    Thread Starter markamp

    (@markamp)

    1) set_time_limit(60); does help a little bit further.

    2) I replaced the code but don’t see any changes.

    3) Some remarks on my last workflow: the “needs cache refresh”-dialogue shows 198 boards on 10 pages. Step by step i chached page per page. 9 out of 10 are beeing cached sucessfully. Due to increasing the time limit (see above). But when i tried to chache the last one ….. *grmpf* i get an “500 internal server error”.

    Now it’s impossible to call the import dialogue. Shall i wait for 180 minutes or is there another way to delete the session?

    Plugin Author grosbouff

    (@grosbouff)

    So you have a HUUUUGE amount of boards πŸ™‚
    Why don’t you cache some boards, import their pins; then do the same for other boards ?

    Thread Starter markamp

    (@markamp)

    As i’m importing since the weekend and it’s done for 98% (estimated) i’d like to avoid beginning a new import from zero.

    The problem: due to the former “Error while setting post thumbnail ….” some imported boards are missing one or two pins. But i don’t know which ones. If i cache a board the plugin shows me which pins are already imported and which ones are missing. That’s the reason why i try to cache all of them. Just to get the few missing ones ….

    Thread Starter markamp

    (@markamp)

    Finally it worked. I had to clean the database from posts without featured images (due to the former error, see above) and that’s it.

    GREAT! All my pins are imported.

    Just to let the world know: with ver. 0.2.4 it’s possible to import even thousands of pins! Just do it step by step!

    Thanks a lot!
    Marc

    Plugin Author grosbouff

    (@grosbouff)

    @markamp

    Glad I could have helped you importing your pins.
    In 0.2.4, posts are automatically deleted if featured image wasn’t imported, so people won’t get that bug again.

    If you like the plugin, please consider reviewing it and making a donation !
    Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Performance’ is closed to new replies.