-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
Middleman server hangs, with no error/stack trace #1367
Comments
I am now able to initiate the server reliably by reverting middleman to 3.3.4, and padrino-helpers/padrino-support to 0.12.2 (to counteract this issue). Including my new gemfile.lock below: GEM
remote: https://rubygems.org/
specs:
activesupport (4.1.5)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
breakpoint (2.5.0)
sass (~> 3.3)
sassy-maps (< 1.0.0)
celluloid (0.16.0)
timers (~> 4.0.0)
chunky_png (1.3.1)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
compass (1.0.0.rc.0)
chunky_png (~> 1.2)
compass-core (~> 1.0.0.rc.0)
compass-import-once (~> 1.0.4)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.1)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.4)
sass (>= 3.2, < 3.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
eventmachine (1.0.3-x86-mingw32)
execjs (2.2.1)
ffi (1.9.3-x86-mingw32)
haml (4.0.5)
tilt
hike (1.2.3)
hitimes (1.2.2)
hooks (0.4.0)
uber (~> 0.0.4)
http_parser.rb (0.6.0)
i18n (0.6.11)
json (1.8.1)
kramdown (1.4.1)
listen (2.7.9)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
middleman (3.3.4)
coffee-script (~> 2.2)
compass (>= 0.12.4)
compass-import-once (= 1.0.4)
execjs (~> 2.0)
haml (>= 4.0.5)
kramdown (~> 1.2)
middleman-core (= 3.3.4)
middleman-sprockets (>= 3.1.2)
sass (>= 3.2.17, < 4.0)
uglifier (~> 2.5)
middleman-core (3.3.4)
activesupport (~> 4.1.0)
bundler (~> 1.1)
erubis
hooks (~> 0.3)
i18n (~> 0.6.9)
listen (>= 2.7.9, < 3.0)
padrino-helpers (~> 0.12.1)
rack (>= 1.4.5, < 2.0)
rack-test (~> 0.6.2)
thor (>= 0.15.2, < 2.0)
tilt (~> 1.4.1, < 2.0)
middleman-livereload (3.3.4)
em-websocket (~> 0.5.1)
middleman-core (~> 3.2)
rack-livereload (~> 0.3.15)
middleman-sprockets (3.3.9)
middleman-core (~> 3.3)
sprockets (~> 2.12.1)
sprockets-helpers (~> 1.1.0)
sprockets-sass (~> 1.2.0)
minitest (5.4.1)
multi_json (1.10.1)
padrino-helpers (0.12.2)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.12.2)
tilt (~> 1.4.1)
padrino-support (0.12.2)
activesupport (>= 3.1)
rack (1.5.2)
rack-livereload (0.3.15)
rack
rack-test (0.6.2)
rack (>= 1.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
sass (3.3.14)
sassy-maps (0.4.0)
sass (~> 3.3)
slim (2.0.3)
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
sprockets (2.12.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-helpers (1.1.0)
sprockets (~> 2.0)
sprockets-sass (1.2.0)
sprockets (~> 2.0)
tilt (~> 1.1)
susy (2.1.3)
sass (>= 3.3.0, < 3.5)
temple (0.6.8)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
timers (4.0.0)
hitimes
tzinfo (1.2.2)
thread_safe (~> 0.1)
tzinfo-data (1.2014.7)
tzinfo (>= 1.0.0)
uber (0.0.8)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
wdm (0.1.0)
PLATFORMS
x86-mingw32
DEPENDENCIES
breakpoint
coffee-script (~> 2.3.0)
compass (~> 1.0.0.rc.0)
middleman (= 3.3.4)
middleman-livereload (~> 3.3.4)
padrino-helpers (= 0.12.2)
padrino-support (= 0.12.2)
sass (~> 3.3.14)
slim (~> 2.0.3)
susy
tzinfo-data
wdm (~> 0.1.0) |
I'm having the same issue on OS-X.
Going to This works:
So clearly, it's something I'm doing. Going to slowly start adding things in until it breaks. |
Let me know what you track down. Whether it's one of our extensions or one the others. |
I just added everything back in, and it worked. Sob. I'll dig into it some more. |
I am having the same issue under Windows 7-64 and ruby 1.9.3p484 (2013-11-22) [i386-mingw32]. Gemfile 1 (not working)
So I reverted to
So I reverted the
I also need to use
The conflict is resolved by using |
Hi, I had the same issue (freezing middleman and not generating JS files from coffeescript properly) randomly. After everything you described and trial/error session finally i have working setup:
I dont have time to dive deep into the issue, but there is a possibility that exchanging therubyracer for oj might be a solution. The webrick hack for using only one thread didnt work for me either (solution proposed in #652 ). I hope this helps someone. |
Using the Gemfile from above my system does not install |
Bumping this question. I have the same issue on OS X. It happens randomly. Restarting the computer fixes it. |
I don't use Windows, so someone more familiar with that platform will have to offer a suggestion. |
This is also happening on OS-X. It's not every page load, but most... |
Is everyone on this issue using a JS-based template? Like CoffeeScript or Less? |
I am not. I am using Sass and Haml, but no JS template. |
I am also not using Coffeescript and Less. In order to answer your question, I made several tests and I may have found the culprit. I had the following line im my
If I remove the |
Well, I thought I had solved the puzzle, but then I went into a different development folder and there the problem was again. So I made more research and tried to narrow the issue down, but the issue is very strange. It is either a Sass issue or a path issue or a memory issue. I can't tell because I do not get a consistent error. But it certainly has to do with my I have a folder for my SASS-files, that I call
Now, in my There is also an observation, that irritates me: with a given set of files, I cannot get the server started. Then I just rename for instance |
There's a really silly low number of files allowed open by a process in old OS X as well. Are any of you on Yosemite yet? Is everyone using live reload? And/or Sass? |
I am on Yosemite.
|
I am using middleman-livereload and Sass on Windows 7-64. |
+1 |
Right now, it appears to me to be a threading problem. I don't understand the details, however, if I open |
On my case, if I have two tabs open on a Middleman project (one with a running server, and another where I do git commit/pull/push/etc.) it starts hanging. OS X 10.10. |
Having the same issue. Using Issue Output
|
@skezo Can you make a repository available for me to test against? |
Sent you an invite to the repository we are using |
@skezo Taking a look now. All I need to do is |
@tdreyno Yes. |
@skezo Bah, it's currently impossible to install 1.9.3 on Mac OS X 10.10. Have you tried with a modern ruby? |
@tdreyno Checking now on Ruby 2.0.0-p598 |
@tdreyno I am getting build errors when trying to install the middleman gem using Ruby 2.0.0-p598 |
Can you upload the error log? |
Sinatra had a similar issue with Rack, which middleman uses, and fixed it by omitting 205 Reset Content from this line - elsif Array === body and not [204, 304].include?(status.to_i)
+ elsif Array === body and not [204, 205, 304].include?(status.to_i) I notice that middleman is doing something awfully similar. The title of their pull request is "Update Sinatra::Response#finish for Rack 1.5" and I am using Rack 1.5.2. I specified Rack I don't have extensive knowledge of middleman or HTTP caching status codes, but could updating the middleman implementation to no longer set a |
Hmm, not that can't be since middleman is currently doing what Sinatra did to fix their problem. In any case, using Rack 1.4.5 fixed my problem. |
@ashfurrow what happens if you use Rack 1.6.4? |
I'll try that and report back. |
I've tried using that version and things hang immediately. Sometimes the HTML will be loaded by the browser, but the network response doesn't seem to terminate and the page isn't ever rendered. |
But no problems with the old rack? -Ben Sent from my phone
|
Correct. Switched back and it's fine again. |
I had same problem. |
I removed gems |
My guess is that there are multiple problems. At least one seems to be in the JavaScript execution stuff. |
@camskene 👍 Thanks |
Got approach from this ticket comment: * middleman/middleman#1367 (comment)
I'm running into the same issue with no live reloading and no CoffeeScript (I'm only using LESS). HTML is always properly loaded, and some css/js files aren't served. I also tried changing the JS runtime for ExecJS to both Node and JavaScriptCore with no luck. I'm on OS X 10.11.1, ruby 2.2.1p85 for darwin, Middleman 3.3.12 My activate :directory_indexes
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images' Maybe this could help triage the issue? I can't reproduce this consistently, but it happens about 2 out of 3 times. |
It's definitely a race condition in execjs :( We may need to build our own ExecJS extension which forces things to run serially. PRs welcome |
This issue happens to me sporadically, too, to a number of different Middleman projects. One way to reproduce it more reliably is to have 2 browser tabs load the Middleman site at the same time after When Middleman hangs, I have to do One way to reliably work around this issue that I have found is to:
From the look of the problem, it does appear to be an issue with concurrency. Trying to initialize multiple times causes a deadlock to occur. I am trying the Edit: I have seen this issue on Middleman 3.3.x and 3.4.x. I have not upgraded to Middleman 4, yet. |
@vvasabi Removing Less should confirm that it is a JS runtime issue. |
Using |
@vvasabi I'm seeing it on v4.1, so there's that. https://gitlab.com/gitlab-com/www-gitlab-com/issues/842 |
Still having this issue on macOS with v4.1.10; doesn't always happen - depends on the theme and configuration settings. |
FWIW I was having this problem (middleman 4.2.1). Oddly only seemed to manifest reliably when linking more than one CSS (one pure css, the other a large scss). When loading a single CSS (generated from the large scss) the problem only seemed to occur when reloading the page (and then only intermittently). Switching from rubyracer to nodejs seems to have resolved the problem. |
In Ubuntu 18.04 I get
This happens fairly regularly, when refreshing the page to make sure my changes have worked. This morning, though I got this:
Using this Gemfile:
And Gemfile.lock:
Using Ruby 2.4.4 |
@meowsus Looks like all of those stack traces point at middleman-search (https://github.com/manastech/middleman-search), which is a 3rd party plugin not created by the core project. Looks like it's trying to communicate between Ruby and Javascript and failing. Unfortunately, it also looks like that project is pretty dead, so it'll be hard to get support from them. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello
I am running into an issue where middleman will terminate after initiating a server, either with
bundle exec middleman
command orbundle exec middleman server
.The hang causes no stack trace or errors, however the project will successfully build without errors or warnings. I'm a little stumped on how to troubleshoot this.
Below is the result of attempting to initiate a server. The server hangs roughly 8 seconds after launch:
Environment: Windows 7 x64 with ruby 1.9.3p545 (2014-02-24) [i386-mingw32], Middleman 3.3.5
Gemfiles and config.rb available here.
The text was updated successfully, but these errors were encountered: