-
Notifications
You must be signed in to change notification settings - Fork 38
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
Warnings since update version 0.7.0 #30
Comments
Are those the only warnings you get? |
same here
|
Could you please share your production server setup? What appserver do you use? What is your deployment strategy? |
Rails 5.0.2 on debian server.
|
Do you use Unicorn, Puma or something else? What is the config for it? Do you use preloading? Etc. |
Puma here.
|
OS: Ubuntu 16.10 (GNU/Linux 4.8.0-41-generic x86_64) We deploy using Ansible. Our file structure is similar to that of Capistrano, with a releases folder and a symbolic link to the current release. Puma configuration: app_path = ENV['APP_PATH'] || File.expand_path('../../', __FILE__)
working_directory app_path
worker_processes 4
timeout 300
stdout_path "#{app_path}/log/server-app.log"
stderr_path "#{app_path}/log/server-app.log"
pid "#{app_path}/tmp/pids/server-app.pid"
listen "#{app_path}/tmp/sockets/server-app.sock"
# Preload the app, save memory by using copy-on-write
preload_app true
before_fork do |server, worker|
# Prevent the master process from holding ActiveRecord connections
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection_handler.clear_all_connections!
# This allows a new master process to incrementally phase out the old master process
# with SIGTTOU when doing a transparent upgrade. The last worker spawned will then
# kill off the old master process with a SIGQUIT.
old_pid = "#{server.config[:pid]}.oldbin"
if old_pid != server.pid
begin
signal = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
Process.kill(signal, File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
end
end
end |
I think I've found a clue to what is causing the warnings. On the production platform the |
There's a related issue: prawnpdf/prawn#1013. The warning you're seeing is a result of The question is why the file is required twice and why it's done with different paths. |
It seems that the following line in commit 54615e8 (lib/pdf/core.rb) is causing the warnings: require_relative "core/text" Should core/text be required there? |
@pointlessone, @msbit is that |
@Zyphrax this was raised by @pointlessone during the PR review (#26), short story it was required for the spec to pass. The other option is to require it in the spec proper ( This issue could indicate a weird split for text between |
This is reproducable with
This is especially annoying in development...
Sounds like the |
As mentioned by @pointlessone, this is the same issue as #1013. The issue is caused by using
Unless you have a use for requiring a specific file/group of file from the gem independently, then there is no reason to have the requires at the top of each file.
This is a prawn issue. I do not believe that the proposed fix would introduce other issues. I do not consider using a symlink is a valid reason to justify this issue.
I am not sure that this is correct. If it were, this would be a huge issue in bundler.
This is exactly why |
I want to test a few ideas about this. A short survey:
|
/cc @AnwarShah @shevegen |
This issue has been fixed upstream. The fix will be released in Ruby 2.5 and most probably won't be backported but this is still strong indication that this issue is manifestation of a bug. Since this is only warnings and maybe a minor performance issue during code loading I am strongly inclined to not address it in Prawn in any way. Please give your feedback if you have other concerns that are not addressed by the Ruby fix. This issue will be closed in a week. |
@pointlessone Sorry for not being able to reply to the previous question.
|
I think it would be better if this can be fixed in prawn if @msbit's new commit works. Not every one of will be able to use Ruby 2.5. |
Thank you everyone. I'll close this issue now. I'll take into consideration all the arguments once I have more time. Feel free to reopen if you have any arguments you believe may contribute to the discussion. |
You're invited to participate in the further discussion: prawnpdf/prawn#1181. |
I am using Prawn and they switched to the new version of PDF-Core. But since the update I'm getting the following warnings on my production environment.
Do you guys have an idea what might be causing this?
I don't get the warnings on my development environment.
The text was updated successfully, but these errors were encountered: