Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pocket import 500 internal error #1661

Closed
0wnrepo opened this issue Feb 9, 2016 · 14 comments
Closed

Pocket import 500 internal error #1661

0wnrepo opened this issue Feb 9, 2016 · 14 comments
Labels
Milestone

Comments

@0wnrepo
Copy link
Contributor

0wnrepo commented Feb 9, 2016

Edit by @j0k3r
TL;DR: we need async import.


What happens when you have over 100k links in pocket and you try to import them ?
//trying with memory_limit=-1 right now..

Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 414
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239488  {main}( )   .../router_prod.php:0
2   0.0002  247696  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0186  3618176 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0469  8112232 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0469  8113208 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2180  27010984    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2180  27011440    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.2758  30885776    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   16.8771 78223216    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  134.1932    91584760    Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  134.1932    91584760    Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  134.1933    91586200    Graby\Graby->doFetchContent( )  .../Graby.php:137
13  135.3590    91788488    Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 418
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239488  {main}( )   .../router_prod.php:0
2   0.0002  247696  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0186  3618176 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0469  8112232 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0469  8113208 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2180  27010984    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2180  27011440    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.2758  30885776    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   16.8771 78223216    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  134.1932    91584760    Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  134.1932    91584760    Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  134.1933    91586200    Graby\Graby->doFetchContent( )  .../Graby.php:137
13  135.3590    91788488    Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6848701 bytes) in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/safecurl/src/SafeCurl.php on line 177
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239488  {main}( )   .../router_prod.php:0
2   0.0002  247696  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0186  3618176 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0469  8112232 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0469  8113208 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2180  27010984    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2180  27011440    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.2758  30885776    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   16.8771 78223216    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  323.2689    116209760   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  323.2689    116209760   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  323.2690    116211200   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  323.2691    116212928   Graby\Extractor\HttpClient->fetch( )    .../Graby.php:171
14  323.2692    116215744   GuzzleHttp\Client->get( )   .../HttpClient.php:140
15  323.2694    116225400   GuzzleHttp\Client->send( )  .../Client.php:125
16  323.2694    116226824   GuzzleHttp\RequestFsm->__invoke( )  .../Client.php:165
17  323.2710    116229552   Graby\Ring\Client\SafeCurlHandler->__invoke( )  .../RequestFsm.php:129
18  323.2710    116229688   Graby\Ring\Client\SafeCurlHandler->_invokeAsArray( )    .../SafeCurlHandler.php:34
19  323.2712    116233680   fin1te\SafeCurl\SafeCurl->execute( )    .../SafeCurlHandler.php:59
20  327.1738    129939176   substr ( )  .../SafeCurl.php:177
Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
@tcitworld
Copy link
Member

Seems like Readabilty returns an empty content, @j0k3r ?

@0wnrepo Were the rest of the articles imported ?

@0wnrepo
Copy link
Contributor Author

0wnrepo commented Feb 9, 2016

@tcitworld no article was imported from pocket.
EDIT with memory_limit = -1 it imported 461 articles

@tcitworld
Copy link
Member

//trying with memory_limit=-1 right now.

Did it changed anything ? Setting memory_limit to -1 is not a great idea in this particular case, you should increase it by steps to see if it changes anything.

@0wnrepo
Copy link
Contributor Author

0wnrepo commented Feb 9, 2016

tried with php.ini memory_limit = -1
EDIT It imported 461 articles.
EDIT2 72 of 461 articles are marked
<p>Unable to retrieve readable content.</p>


( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 414
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  77.5666 87648432    Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  77.5667 87648432    Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  77.5667 87649872    Graby\Graby->doFetchContent( )  .../Graby.php:137
13  78.9459 87851688    Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 418
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  77.5666 87648432    Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  77.5667 87648432    Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  77.5667 87649872    Graby\Graby->doFetchContent( )  .../Graby.php:137
13  78.9459 87851688    Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 414
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  249.7216    155124912   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  249.7216    155124912   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  249.7216    155126352   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  251.0878    155326472   Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 418
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  249.7216    155124912   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  249.7216    155124912   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  249.7216    155126352   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  251.0878    155326472   Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 414
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  261.4883    156274768   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  261.4883    156274768   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  261.4883    156276208   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  262.6456    156482632   Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 418
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  261.4883    156274768   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  261.4883    156274768   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  261.4883    156276208   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  262.6456    156482632   Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 414
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  265.9170    156770800   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  265.9170    156770800   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  265.9172    156772240   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  267.1336    156943896   Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 418
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  265.9170    156770800   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  265.9170    156770800   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  265.9172    156772240   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  267.1336    156943896   Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 414
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  286.6130    157828280   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  286.6130    157828280   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  286.6130    157829720   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  287.7956    158001832   Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Notice: Trying to get property of non-object in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 418
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  286.6130    157828280   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  286.6130    157828280   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  286.6130    157829720   Graby\Graby->doFetchContent( )  .../Graby.php:137
13  287.7956    158001832   Graby\Extractor\ContentExtractor->process( )    .../Graby.php:213

( ! ) Fatal error: Maximum execution time of 60 seconds exceeded in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Graby.php on line 696
Call Stack
#   Time    Memory  Function    Location
1   0.0001  239904  {main}( )   .../router_prod.php:0
2   0.0002  248216  require( '/Users/ed/Desktop/wally5/wallabag/web/app.php' )  .../router_prod.php:40
3   0.0173  3619488 Symfony\Component\HttpKernel\Kernel->handle( )  .../app.php:28
4   0.0442  8113712 Symfony\Component\HttpKernel\HttpKernel->handle( )  .../bootstrap.php.cache:2300
5   0.0442  8114664 Symfony\Component\HttpKernel\HttpKernel->handleRaw( )   .../bootstrap.php.cache:2951
6   0.2122  27013336    call_user_func_array:{/Users/ed/Desktop/wally5/wallabag/var/bootstrap.php.cache:2989} ( )   .../bootstrap.php.cache:2989
7   0.2122  27013792    Wallabag\ImportBundle\Controller\PocketController->callbackAction( )    .../bootstrap.php.cache:2989
8   1.4120  30888480    Wallabag\ImportBundle\Import\PocketImport->import( )    .../PocketController.php:56
9   18.1706 78225672    Wallabag\ImportBundle\Import\PocketImport->parseEntries( )  .../PocketImport.php:154
10  467.0158    169563112   Wallabag\CoreBundle\Helper\ContentProxy->updateEntry( ) .../PocketImport.php:222
11  467.0159    169563112   Graby\Graby->fetchContent( )    .../ContentProxy.php:38
12  473.7475    170339472   Graby\Graby->getExcerpt( )  .../Graby.php:153
13  473.7477    170565712   preg_replace ( )    .../Graby.php:696
Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

@j0k3r j0k3r added the Bug label Feb 9, 2016
@j0k3r j0k3r added this to the 2.0.0 milestone Feb 9, 2016
@tcitworld
Copy link
Member

The content must be quite long for a simple preg_replace going to timeout ?

@j0k3r
Copy link
Member

j0k3r commented Feb 9, 2016

Yeah we never tested the PocketImport on a huge database. In fact, it works fine for small import but we didn't test it on a big one. I've setup an IFTTT recipe few months ago so I fill up my fresh Pocket account and will test import later.

Anyway, can you tell me what do you have at lines 414 & 418 ? Just to target the problem. Also, it could be really awesome if you can get the url which generate this error so I can check graby with that url.

Finally, could you tell me the version of graby inside your composer.lock ?

@tcitworld I didn't see this line on the error. And I don't think a preg_replace can timeout 😳

@tcitworld
Copy link
Member

The last (and Fatal) error, different from the others which are just Notices :

( ! ) Fatal error: Maximum execution time of 60 seconds exceeded in /Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Graby.php on line 696

@0wnrepo
Copy link
Contributor Author

0wnrepo commented Feb 9, 2016

@j0k3r how to grab that url ? do you need my pocket app token ?

/Users/ed/Desktop/wally5/wallabag/vendor/j0k3r/graby/src/Extractor/ContentExtractor.php on line 414
414 :                 while ($firstChild->nextSibling != null && $firstChild->nodeType && ($firstChild->nodeType !== XML_ELEMENT_NODE)) {
418 : if ($firstChild->nodeType === XML_ELEMENT_NODE
419                 && in_array(strtolower($firstChild->tagName), array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'))
420                 && (strtolower(trim($firstChild->textContent)) == strtolower(trim($this->title)))) {
421                 $this->body->removeChild($firstChild);
422          }
"name": "j0k3r/graby",
            "version": "1.2.0",

@j0k3r
Copy link
Member

j0k3r commented Feb 9, 2016

On that exact same file (vendor/j0k3r/graby/src/Extractor/ContentExtractor.php), you can var_dump($url); on line 157, just before $this->reset(); in the process( function and it'll dump the url.

Let me know otherwise I might try to use your token.

@tcitworld oh yeah, I missed that :)

@tcitworld
Copy link
Member

It will not be necessary if you manage to get the urls. ;)

@0wnrepo
Copy link
Contributor Author

0wnrepo commented Feb 9, 2016

Added as @j0k3r suggested
if (!$firstChild) { var_dump($url); die(); } while ($firstChild->nextSibling != null && $firstChild->nodeType && ($firstChild->nodeType !== XML_ELEMENT_NODE)) {
Got a decent article
string 'http://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=td0P8qrS8iI&format=xml' (length=88)

@j0k3r
Copy link
Member

j0k3r commented Feb 9, 2016

The timeout isn't related to preg_replace it just that the server timeout because it has too many articles to import (> 100k). It'll be definitively a case for async import.

BTW, I managed to fix few errors in graby.

Anyway, thanks a ton @0wnrepo for your help on that. We'll keep in touch when async import will be ready 😉

@0wnrepo
Copy link
Contributor Author

0wnrepo commented Feb 9, 2016

Great !

@j0k3r
Copy link
Member

j0k3r commented Feb 12, 2016

@0wnrepo I'll close that issue because it's mainly related to something we already started here: #1581
Thanks for the debug and all information BTW 👍

@j0k3r j0k3r closed this as completed Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants