Sha256: f6a9d1b08ac12067c47177e9a91c082755c4f2980f15ca6bf763d5a27124a2a2
Contents?: true
Size: 808 Bytes
Versions: 8
Compression:
Stored size: 808 Bytes
Contents
#!/usr/bin/env ruby require 'jugglite' # You can use some of the options you would pass to thin # eg: # --max-conns NUM (might require a higher system "ulimit -n" setting) # --port PORT # --address HOST # --socket FILE options = Thin::Runner.new(ARGV).options listen_options = if options[:socket] then [options[:socket]] else [options[:address], options[:port]] end thin = Thin::Server.new(Jugglite::App.new, *listen_options, options) # Need to increase the descriptor-table for EventMachine if options[:max_conns] new_size = EM.set_descriptor_table_size( options[:max_conns].to_i ) STDERR.puts "New descriptor-table size is #{new_size}" EM.epoll EM.kqueue thin.maximum_connections = options[:max_conns] # Need to do this manually because it gets overriden on thin/server.rb:123 end thin.start!
Version data entries
8 entries across 8 versions & 1 rubygems