Heroku Sinatra应用程序截断html页面?

问题描述 投票:0回答:1

我在直到2月初一直运行良好的Sinatra应用程序遇到一些问题。它托管在heroku-18 EU堆栈上。该应用程序是一个简单,静态的网站,没有数据库。在本地运行它绝对可以。我可以毫无问题地推动和构建Heroku。有关构建历史,请参见下文:

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.6.5
-----> Vendoring libpq 5.12.1
-----> Removing BUNDLED WITH version in the Gemfile.lock
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at all.
       https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using bundler 2.0.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
       Fetching gem metadata from https://rubygems.org/..............
       Fetching gem metadata from https://rubygems.org/.
       Resolving dependencies...
       Using rake 13.0.1
       Using concurrent-ruby 1.1.5
       Using minitest 5.14.0
       Using thread_safe 0.3.6
       Using zeitwerk 2.2.2
       Using builder 3.2.4
       Using erubi 1.9.0
       Using mini_portile2 2.4.0
       Using crass 1.0.6
       Using rack 2.1.2
       Using bundler 2.0.2
       Using erubis 2.7.0
       Using ffi 1.12.2
       Using temple 0.8.2
       Using tilt 2.0.10
       Using sexp_processor 4.13.0
       Using method_source 0.9.2
       Using thor 1.0.1
       Using mini_mime 1.0.2
       Using ruby2_keywords 0.0.2
       Using newrelic_rpm 6.8.0.360
       Using i18n 1.8.2
       Using tzinfo 1.2.6
       Using nokogiri 1.10.7
       Using rack-test 1.1.0
       Using haml 5.1.2
       Using ruby_parser 3.14.1
       Using mail 2.7.1
       Using mustermann 1.1.1
       Using rack-protection 2.0.8.1
       Using sassc 2.2.1
       Using sprockets 4.0.0
       Using activesupport 6.0.2.1
       Using loofah 2.4.0
       Using html2haml 2.2.0
       Using pony 1.13.1
       Using sinatra 2.0.8.1
       Using rails-dom-testing 2.0.3
       Using rails-html-sanitizer 1.3.0
       Using actionview 6.0.2.1
       Using actionpack 6.0.2.1
       Using railties 6.0.2.1
       Using sprockets-rails 3.2.1
       Using haml-rails 2.0.1
       Using sassc-rails 2.1.2
       Using sass-rails 6.0.0
       Bundle complete! 5 Gemfile dependencies, 46 gems now installed.
       Gems in the groups development and test were not installed.
       Bundled gems are installed into `./vendor/bundle`
       Bundle completed (4.18s)
       Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Detecting rake tasks
-----> Detecting rails configuration
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at all.
       https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Discovering process types
       Procfile declares types     -> web
       Default types for buildpack -> console, rake
-----> Compressing...
       Done: 52.6M
-----> Launching...
       Released v276
       https://rashmi.herokuapp.com/ deployed to Heroku

但是,该应用无法正确地向客户端提供页面-由于某种原因,它似乎正在截断HTML:

[http://rashmi.herokuapp.com-无内容

http://rashmi.herokuapp.com/cv-截短

根据应用程序日志,它正在正确地提供页面(HTTP状态200):

2020-02-07T22:12:36.212029+00:00 heroku[router]: at=info method=GET path="/Rashmi2Thumb.jpg" host=rashmi.herokuapp.com request_id=a9e35c87-2df5-43d6-945a-15b3ebb8cbb3 fwd="12.203.63.157" dyno=web.1 connect=0ms service=6ms status=200 bytes=31507 protocol=https
2020-02-07T22:12:36.423599+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=rashmi.herokuapp.com request_id=59a27bf7-f4c0-469c-8a0b-09e7e9c616ae fwd="12.203.63.157" dyno=web.1 connect=0ms service=6ms status=200 bytes=15671 protocol=https
2020-02-07T22:12:38.842421+00:00 app[web.1]: 12.203.63.157 - - [07/Feb/2020:22:12:38 +0000] "GET / HTTP/1.1" 200 7247 0.0042
2020-02-07T22:12:38.844068+00:00 heroku[router]: at=info method=GET path="/" host=rashmi.herokuapp.com request_id=b3706632-c418-4b91-b997-ac45f1b9f500 fwd="12.203.63.157" dyno=web.1 connect=1ms service=13ms status=200 bytes=11863 protocol=https
2020-02-07T22:15:30.194189+00:00 heroku[router]: at=info method=GET path="/cv" host=rashmi.herokuapp.com request_id=cf6d20b6-10e2-4779-9efc-ac5fb05c1d60 fwd="12.203.63.157" dyno=web.1 connect=0ms service=7ms status=200 bytes=42272 protocol=https
2020-02-07T22:15:30.191932+00:00 app[web.1]: 12.203.63.157 - - [07/Feb/2020:22:15:30 +0000] "GET /cv HTTP/1.1" 200 41023 0.0032
2020-02-07T22:15:30.607777+00:00 app[web.1]: 12.203.63.157 - - [07/Feb/2020:22:15:30 +0000] "GET /cvcss.css HTTP/1.1" 200 3674 0.0017
2020-02-07T22:15:30.791636+00:00 app[web.1]: 12.203.63.157 - - [07/Feb/2020:22:15:30 +0000] "GET /bg.jpg HTTP/1.1" 200 7734 0.0016
2020-02-07T22:15:30.609117+00:00 heroku[router]: at=info method=GET path="/cvcss.css" host=rashmi.herokuapp.com request_id=c1441366-1b0e-40a0-8671-e9a5bf8c8a2f fwd="12.203.63.157" dyno=web.1 connect=0ms service=4ms status=200 bytes=3890 protocol=https
2020-02-07T22:15:30.793122+00:00 heroku[router]: at=info method=GET path="/bg.jpg" host=rashmi.herokuapp.com request_id=9973059c-b604-4947-836d-824066eb3a06 fwd="12.203.63.157" dyno=web.1 connect=0ms service=4ms status=200 bytes=7984 protocol=https
2020-02-07T22:17:47.814164+00:00 app[web.1]: 12.203.63.157 - - [07/Feb/2020:22:17:47 +0000] "GET / HTTP/1.1" 200 7247 0.0021
2020-02-07T22:17:47.816197+00:00 heroku[router]: at=info method=GET path="/" host=rashmi.herokuapp.com request_id=4aadb75e-d89e-40d2-912b-428c8b4c45f3 fwd="12.203.63.157" dyno=web.1 connect=0ms service=5ms status=200 bytes=10415 protocol=https

有什么想法吗?直到2月初,它的运行情况都非常好,这使我怀疑是否存在某种无声的heroku堆栈升级,这会引起问题。因为日志表明没有问题,所以我无法进一步诊断。我曾尝试与Heroku取得联系,但未收到任何回复。任何想法表示感谢!

ruby-on-rails ruby heroku sinatra truncate
1个回答
0
投票

更新-看来New Relic附加组件有问题。我已经删除了它,现在该应用程序可以很好地处理HTML。最近肯定有一个静默更新,以某种方式中断了HTML的投放。

© www.soinside.com 2019 - 2024. All rights reserved.