sculpin / sculpin-blog-skeleton

A skeleton for a Sculpin based blog.
MIT License
83 stars 88 forks source link

`sculpin-watch` times out #66

Open opdavies opened 5 years ago

opdavies commented 5 years ago

When running composer sculpin-watch, the command times out after 5 minutes due to the process timeout.

[Symfony\Component\Process\Exception\ProcessTimedOutException] The process "./vendor/bin/sculpin generate --watch --server" exceeded the timeout of 300 seconds.

COMPOSER_PROCESS_TIMEOUT=0 composer sculpin-watch works.

Is there a better way of doing this?

ChristianRiesen commented 5 years ago

It can be configured inside composer.json directly: https://getcomposer.org/doc/06-config.md#process-timeout

But then everything that composer does is obeying that. Personally I'm doing this: https://github.com/gamestrafe/thedivision2/blob/master/scripts/run.sh Which works rather well for me so far. It's very specific to my setup though, so paths probably will need changing if you want to adopt it (haven't been un-lazy enough to make it more universal yet).

opdavies commented 5 years ago

Hmm, I haven't experienced any timeout issues when running sculpin generate ... on the command line, only when running it via a Composer script.

ChristianRiesen commented 5 years ago

It's because composer has a timeout, the sculpin command directly has not.

opdavies commented 5 years ago

Sorry, yes. I was trying to say that looking at the script, if you're running vendor/bin/sculpin generate ... directly, I haven't seen issues with that timing out.

I've used bash scripts before just to simplify the command which works fine (actually, I still have some on my site - https://github.com/opdavies/oliverdavies.uk/blob/master/scripts/watch.sh), it's just the Composer script way seems cleaner if it didn't have the timeout issue.

beryllium commented 5 years ago

Last night I submitted a PR to Composer that would provide a quick way to stop known long-running scripts from timing out. I'll look into updating this repo to use that approach or something similar (perhaps with wider support for composer versions to start).