clockwork icon indicating copy to clipboard operation
clockwork copied to clipboard

New User - runtime errors

Open kapsoft opened this issue 8 years ago • 12 comments

Hi,

Trying out your package (looks good but...) getting some errors. From your console:

isdb.test/__clockwork/1520887890-8195-1931755551 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

extensions::messaging:121 Uncaught Error: Message length exceeded maximum allowed length. at PortImpl.postMessage (extensions::messaging:121:13) at Port.publicClassPrototype.(anonymous function) [as postMessage] (extensions::utils:138:26) at responseCallback (extensions::messaging:210:16) at XMLHttpRequest.xhr.onreadystatechange (chrome-extension://dmggabnehkmmfmdffgajcflpdjlnoemp/assets/javascripts/chrome/background.js:29:4)

Any ideas?

Thx DJK

kapsoft avatar Mar 13 '18 13:03 kapsoft

Hey,

looks like the problem might be your app collecting so much Clockwork metadata (lots of log messages, queries, etc.) that we are exceeding limits of Chrome apis we use to pass the data around.

If that's the case it would be possible to pass the data around in chunks, I'll try to reproduce this and look into fixing later today.

itsgoingd avatar Mar 13 '18 15:03 itsgoingd

I appreciate your update and hard work. But getting same result. No a high priority for myself right now. Thanks again.

kapsoft avatar Mar 15 '18 02:03 kapsoft

Hey, can you please try out the code from this branch - https://github.com/itsgoingd/clockwork-chrome/tree/handle-very-large-metadata ?

To load the extension - download the branch as a zip, extract wherever, go to the extensions page in Chrome, disable the Clockwork extension installed from webstore, click on "load unpacked extension" and select the downloaded dir.

Though I'm not sure this solves the root cause of the issue as it would mean your app is collecting 32M+ of metadata (not impossible, but unlikely). Can you also manually check what do you get from http://isdb.test/__clockwork/1520887890-8195-1931755551?

itsgoingd avatar Mar 15 '18 12:03 itsgoingd

Manually checking I get out of memory error. Wow. Wonder what's going on with this.

(1/1) FatalErrorExceptionAllowed memory size of 536870912 bytes exhausted (tried to allocate 134090752 bytes)

in JsonResponse.php (line 67) at FatalErrorException->__construct()in HandleExceptions.php (line 137) at HandleExceptions->fatalExceptionFromError()in HandleExceptions.php (line 123) at HandleExceptions->handleShutdown()in HandleExceptions.php (line 0) at json_encode()in JsonResponse.php (line 67) at JsonResponse->setData()in JsonResponse.php (line 50) at JsonResponse->__construct()in JsonResponse.php (line 27) at JsonResponse->__construct()in ClockworkSupport.php (line 56) at ClockworkSupport->getData()in CurrentController.php (line 18) at CurrentController->getData()in Controller.php (line 55) at call_user_func_array:{/home/isdb/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:55}()in Controller.php (line 55) at Controller->callAction()in ControllerDispatcher.php (line 44) at ControllerDispatcher->dispatch()in Route.php (line 203) at Route->runController()in Route.php (line 160) at Route->run()in Router.php (line 572) at Router->Illuminate\Routing{closure}()in Pipeline.php (line 30) at Pipeline->Illuminate\Routing{closure}()in Pipeline.php (line 102) at Pipeline->then()in Router.php (line 574) at Router->runRouteWithinStack()in Router.php (line 533) at Router->dispatchToRoute()in Router.php (line 511) at Router->dispatch()in Kernel.php (line 176) at Kernel->Illuminate\Foundation\Http{closure}()in Pipeline.php (line 30) at Pipeline->Illuminate\Routing{closure}()in TrustProxies.php (line 56) at TrustProxies->handle()in Pipeline.php (line 148) at Pipeline->Illuminate\Pipeline{closure}()in Pipeline.php (line 53) at Pipeline->Illuminate\Routing{closure}()in CheckForMaintenanceMode.php (line 46) at CheckForMaintenanceMode->handle()in Pipeline.php (line 148) at Pipeline->Illuminate\Pipeline{closure}()in Pipeline.php (line 53) at Pipeline->Illuminate\Routing{closure}()in ClockworkMiddleware.php (line 28) at ClockworkMiddleware->handle()in Pipeline.php (line 148) at Pipeline->Illuminate\Pipeline{closure}()in Pipeline.php (line 53) at Pipeline->Illuminate\Routing{closure}()in Request.php (line 111) at Request->handle()in Pipeline.php (line 148) at Pipeline->Illuminate\Pipeline{closure}()in Pipeline.php (line 53) at Pipeline->Illuminate\Routing{closure}()in Pipeline.php (line 102) at Pipeline->then()in Kernel.php (line 151) at Kernel->sendRequestThroughRouter()in Kernel.php (line 116) at Kernel->handle()in index.php (line 53) at {main}()in index.php (line 0)

kapsoft avatar Mar 15 '18 13:03 kapsoft

Also,

Don't know how to force download branch of extension. Only gives me master on zip download.

DJK

kapsoft avatar Mar 15 '18 13:03 kapsoft

Here is a direct link - https://github.com/itsgoingd/clockwork-chrome/archive/handle-very-large-metadata.zip - though this won't help until the endpoint actually returns some data.

We are running out of memory while trying to convert collected Clockwork data to json here - https://github.com/itsgoingd/clockwork/blob/v2/Clockwork/Support/Laravel/ClockworkSupport.php#L56 - I guess the easiest way to debug this is by simply dd-ing the $data and it should be obvious what's so big we can't JSON encode it with 512M of memory.

itsgoingd avatar Mar 18 '18 13:03 itsgoingd

Wow. Put that in and expected to see dump in browser but got nothing. Am I looking in wrong place for dump?

All is not lost. I think trying Clockwork I might have exposed a major flaw in my internal API calls. Thanks.

DJK

kapsoft avatar Mar 19 '18 01:03 kapsoft

There is actually an easier way to get the data, look for a file named 1520887890-8195-1931755551.json in storage/clockwork.

You can either take a look at the data yourself or send it to me for further analysis. Note that the collected data might include some personal information, either censor the data before or send it privately via email at [email protected].

itsgoingd avatar Mar 19 '18 10:03 itsgoingd

Under storage I have no clockwork directory or file.

DJK

Dean Kaplan Kapsoft

610-585-6454 @kapsoft

http://isdb.io - The Internet Sports Database.

http://kapsoft.com http://deanonsoftware.com http://mobilestencil.com

On Mon, Mar 19, 2018 at 6:20 AM, its [email protected] wrote:

There is actually an easier way to get the data, look for a file named 1520887890-8195-1931755551.json in storage/clockwork.

You can either take a look at the data yourself or send it to me for further analysis. Note that the collected data might include some personal information, either censor the data before or send it privately via email at [email protected].

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/itsgoingd/clockwork/issues/243#issuecomment-374164222, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnm9rI9oPxP3agwqz91uCb0oA7x-ufqks5tf4Z5gaJpZM4SopqB .

kapsoft avatar Mar 19 '18 12:03 kapsoft

Correction. I was looking in wrong place. Apologies. Opening now (very large).

DJK

Dean Kaplan Kapsoft

610-585-6454 @kapsoft

http://isdb.io - The Internet Sports Database.

http://kapsoft.com http://deanonsoftware.com http://mobilestencil.com

On Mon, Mar 19, 2018 at 6:20 AM, its [email protected] wrote:

There is actually an easier way to get the data, look for a file named 1520887890-8195-1931755551.json in storage/clockwork.

You can either take a look at the data yourself or send it to me for further analysis. Note that the collected data might include some personal information, either censor the data before or send it privately via email at [email protected].

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/itsgoingd/clockwork/issues/243#issuecomment-374164222, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnm9rI9oPxP3agwqz91uCb0oA7x-ufqks5tf4Z5gaJpZM4SopqB .

kapsoft avatar Mar 19 '18 12:03 kapsoft

So after finally viewing data looks like you are recording all internal SQL queries. There is one bad one in here that I knew about and was on the list for refactoring.

Good stuff. Thanks for the help.

DJK

Dean Kaplan Kapsoft

610-585-6454 @kapsoft

http://isdb.io - The Internet Sports Database.

http://kapsoft.com http://deanonsoftware.com http://mobilestencil.com

On Mon, Mar 19, 2018 at 6:20 AM, its [email protected] wrote:

There is actually an easier way to get the data, look for a file named 1520887890-8195-1931755551.json in storage/clockwork.

You can either take a look at the data yourself or send it to me for further analysis. Note that the collected data might include some personal information, either censor the data before or send it privately via email at [email protected].

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/itsgoingd/clockwork/issues/243#issuecomment-374164222, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnm9rI9oPxP3agwqz91uCb0oA7x-ufqks5tf4Z5gaJpZM4SopqB .

kapsoft avatar Mar 19 '18 13:03 kapsoft

No problem, glad we figured it out.

You can disable collecting database queries by publishing the Clockwork config via artisan vendor:publish and adding databaseQueries to the filter setting.

itsgoingd avatar Mar 19 '18 13:03 itsgoingd