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

Error: Penthouse timed out after 30s. #284

Closed
danchukas opened this issue Feb 20, 2018 · 5 comments
Closed

Error: Penthouse timed out after 30s. #284

danchukas opened this issue Feb 20, 2018 · 5 comments

Comments

@danchukas
Copy link

danchukas commented Feb 20, 2018

cat /tmp/cs_4DTK26 | critical --folder /project_public_root --inline > /tmp/cd_TKmFq3
Error: Penthouse timed out after 30s.

/tmp/cs_4DTK26:

<!DOCTYPE html>
<html>
<head>
    <link rel="preload" href="https://project.com.local/template/css/cache/modstyles_ca56d2404478ebb290ec8f47c830bd02_1516027304.css_v_1516027304" as="style">
...

/tmp/cd_TKmFq3 is empty

What to do ?

@pocketjoso
Copy link
Contributor

I think you should be able to change the default penthouse timeout from critical. The critical library accepts a penthouse options object, you can set it to: {timeout: 60000} to see if that resolves your issue.

If your still get timeouts, then something on your site seems to be causing Penthouse to hang. If so, can you share a public url that you are generating critical css for, and I can test it?

@epcliff
Copy link

epcliff commented Aug 15, 2018

Hi, I have the same issue. It was working before and now I suddenly get this penthouse error message. Also, I already changed the timeout option and still getting the error. Is there a way to find out the exact error?

@pocketjoso
Copy link
Contributor

pocketjoso commented Aug 15, 2018

As I mentioned earlier, it's most likely one of two things that is happening.

Job is really running out of time

If you are running critical/penthouse for lots of pages/urls/dimensions at the same time, then it's possible that your computer is just slowing down because too much execution is done in parallel. You can try reducing the number of critical css files you are trying to execute at the same time, and/or increasing the timeout.

Job is hanging

In this case it's most likely something specific on the page that causes the problem. To help with this, I need the specific URL you are using so that I can debug.

@danchukas I'm sorry, I think you replied to me before, but somehow I only got an email, and I didn't see your reply here.. It was mentioned that hertz.com causes timeouts like this in Penthouse. What causes the problem on hertz.com is this code in the html:

<meta HTTP-EQUIV="REFRESH" content="0; url=/rentacar/errors/jsCookieErrorPage?nojs=true">

This causes the page to unload during the critical css generation, which is not supported. In earlier versions of Penthouse this would cause penthouse to hang and thus timeouts, but this was changed in Penthouse@1.6.1, which the latest Critical version uses. Instead an error is thrown.

What do do

  • upgrade to the latest critical version
  • if some urls still do not work, note down exactly which ones
  • if you are getting the specific PAGE_UNLOADED_DURING_EXECUTION error, look for meta refresh tags and window.location assignments (i.e. page redirects)
  • if you can't figure out what's going wrong, share url

@mems
Copy link

mems commented Nov 5, 2018

I think it's related to a bug in penthouse: pocketjoso/penthouse#274
And it has been fixed in penthouse@1.9.0

@bezoerb
Copy link
Collaborator

bezoerb commented Nov 29, 2018

Closing this as the issue should be fixed in penthouse. If there's no meta refresh or anything else that could cause a page redirect on load you can also try changing the penthouse timeout.

@bezoerb bezoerb closed this as completed Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants