Questions tagged [unicorn]
A unicorn is a magical weaponized HTTP server for Ruby.
1,273
questions
0
votes
0
answers
4
views
Does Unicorn Release Workers during I/O Wait
I have a rails 6 application using Unicorn.
One of my endpoints handles image uploads to s3.
For test purposes I have made a stack with a single web server running a single unicorn worker.
I have ...
0
votes
0
answers
9
views
bundler is complaining about stringio, but I don't even have that in my Gemfile.lock
I’m building a Rails 6.1.4.4 app and trying to start my unicorn server (using a script that calls unicorn on /usr/local/rvm/wrappers/cfs-web/unicorn) and I keep getting this error
/usr/local/rvm/gems/...
0
votes
0
answers
33
views
How do I interact with a Qiling emulation through standard input?
In pwntools, where a program is waiting for user input (via fgets or similar) an exploit might look like:
from pwn import *
p = process("./vuln")
nop_sled = asm(shellcraft.nop() * 100)
p....
0
votes
1
answer
24
views
How to ensure unicorn disconnects ALL DB connections in rails 6.1?
In unicorn.rb it's common to have clauses like this:
before_fork do |server, worker|
# Disconnect since the database connection will not carry over
if defined? ActiveRecord::Base
ActiveRecord::...
0
votes
0
answers
21
views
When trying to generate Rails unicorn wrapper, nothing is generated
I’m using rvm 1.29.12. I want to create a wrapper for my Rails 6.1.4 application using unicorn, but can’t seem to get the command right. I tried this
$ rvm wrapper ruby-3.0.2 system unicorn
Ruby ...
0
votes
0
answers
29
views
How to exclude a specific field in a specific item in Sitecore's Unicorn serialization
I got a situation where I'd like to exclude a specific field in a specific item.
From what I know and what I read I can exclude fields in Unicorn using two different ways.
One is FieldFilter where I ...
0
votes
0
answers
38
views
action_dispatch/http/mime_type.rb in `+': no implicit conversion of Symbol into Array (TypeError)
Tech stack:
ruby-2.3.0
rails 4.2.8
and command to start the server
unicorn_rails -c config/unicorn.rb -D -E production
Earlier it was fine, but now throws the below error in production
2021-12-...
-1
votes
1
answer
119
views
Sitecore or Unicorn auto sync items locally during night on my dev machine?
I have a problem with my branch being clean when I leave work, and when I return the next morning I have a list of 50 Sitecore items that are updated. It is only a Date Last Syncronized value that ...
0
votes
0
answers
90
views
How can we gracefully shut down Unicorn workers?
I have a Rails 5.2 application running atop Unicorn. The server is configured to fork two worker processes on startup.
I'm introducing an SDK to the application which creates a singleton client object ...
0
votes
0
answers
101
views
Docker environment variable empty in Sitecore patch file
Following this document:
https://doc.sitecore.com/en/developers/101/developer-tools/sync-items-with-a-running-container.html,
I tried to set the sourceFolder variable in a Sitecore patch config file ...
0
votes
0
answers
114
views
Gitlab is working fine on GDK but raising 502 error on production/staging
Actual Error I am getting when I am navigating to URL.
The story is, we have forked a repository from Gitlab Foss and adding additional features to the repository, everything was working fine, but ...
0
votes
0
answers
134
views
Is there a better way than this to get all register keys in Unicorn (in python)?
Documentation for Unicorn engine demonstrates printing register values pretty easily, like so:
from unicorn import *
from unicorn.x86_const import *
ADDRESS = 0x0
# initialize emulator in X86-32bit ...
0
votes
2
answers
317
views
RoR App: “The asset 'application.css' is not present in the asset pipeline”
Info:
Rails 6.1.4
Ruby 3.0.1
PostgreSQL 9.6
NodeJS 11.15.0
Yarn 1.22.5
when I start my APP I always got the same error:
I've tried all I saw in others posts but I can´t resolve this problem.
Any ...
2
votes
0
answers
285
views
Puma not outperforming Unicorn (Rails 5.0 app) - is this normal?
Trying to make better uses of an AWS server that serves roughly 30,000 users/day. Current server:
AWS EC2, t3.xlarge, 4 vCPUs, 16GB memory
Rails 5.0 app, Ruby 2.6.7, web server is nginx
I was ...
1
vote
0
answers
578
views
Rails + Nginx - why i should use fail_timeout=0 for multiple nodes?
In nginx example config file here https://github.com/defunkt/unicorn/blob/master/examples/nginx.conf
you may see that:
# The only setting we feel strongly about is the fail_timeout=0
# directive in ...
0
votes
1
answer
293
views
Unicorn Engine - Emulate ARM and THUMB mode simultaneously
I am fairly new to assembly code, Keystone Engine and Unicorn Engine and I have an issue trying to solve a reverse engineering challenge.
I was given some assembly code which consists of both arm and ...
0
votes
1
answer
79
views
Nginx and Unicorn) Cannot access local server
After deploying my Application(Ruby on Rails) to Heroku using Nginx and Unicorn, I cannot access local server.
When I run 'rails s' command:
% rails s
=> Booting Unicorn
=> Rails 5.2.4.5 ...
0
votes
0
answers
44
views
BeautifulSoup does not work properly on server
I have developed my backend using FastApi, and I am running it with the Unicorn on AWS EC2 ubuntu. In my code, I use BeautifulSoup to work on XML files, but when I pass the large XML file with an ...
0
votes
1
answer
241
views
502 Bad Gateway on platform.sh with rails 6 app + unicorn
I've deployed my rails 6 application on platform.sh
the deployment was successful, but I have a 502 error on home page.
502 Bad Gateway
I think that the migration or the database creation fails.
I ...
0
votes
1
answer
418
views
How to start Unicorn with systemctl and systemd
I would like to start Unicorn with systemctl on the amazon-linux-2, but the Unicorn doesn't start.
I've wrote a /etc/systemd/system/unicorn.service file.
[Unit]
Description=The unicorn process
[...
2
votes
0
answers
283
views
How to setup Rails schema cache with Unicorn, Octopus, and Postgresql
I have this setup:
Rails 5.2
Unicorn HTTP server with preload_app true
Octopus gem (https://github.com/thiagopradi/octopus) for database sharding
Postgresql 12.4
I want to make use of Rails' schema ...
1
vote
0
answers
20
views
How can I run the 2 rails projects with the certificate file of main domain?
I have the SSL certificate file of the main domain - example.com
Currently, I am running the one Rails App on AWS EC2 using Rails + Unicorn + Nginx.
This is my Nginx config file which works.
upstream ...
0
votes
1
answer
200
views
rails app hangs when redirect to .pdf url with wicked_pdf middle wear, but generates the pdf file in /tmp after system time out
the problem:
both my prod and dev environment is using nginx and unicorn, i am trying to use wicked_pdf gem to generate a pdf version of my user list page, it is working in the dev environment. ...
0
votes
1
answer
478
views
Nginx and Unicorn not working due to unicorn.sock file error
I am setting up VPS for the first time on upcloud. I am using unicorn 5.5.5 with Nginx. Rails 4.2.8 and ruby 2.4.2. My Nginx service runs fine. Doesn't show any error. Whenever I start unicorn service ...
1
vote
1
answer
165
views
Singleton disappears when forking unicorn processes in Rails
I've got a rails app running ruby 2.4.4 using Unicorn as a web server which makes use of a singleton to read from Kafka in a background thread. The idea is to have a single instance of the singleton ...
0
votes
1
answer
96
views
How do I configure SSL on Nginx and Unicorn for Rails application?
I am trying to add SLL to my rails app. For that, I am using certbot. Till now I have gone through these articles link 1 and link 2. But both are not working. Let me know what is the issue.
As when ...
0
votes
1
answer
146
views
Ubuntu + Unicorn: You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
I have a problem to run unicorn on Ubuntu 16. When trying to run it - either manually (service unicorn_myapp_staging restart) or through Capistrano, I get this message: You must use Bundler 2 or ...
0
votes
1
answer
104
views
Unicorn different timeout for different controller actions
I have simple question but cannot find the answer. Can I set different timeout for different controller action?
The reason is that I am serving one huge json for d3.js chart and unicorn is killing ...
0
votes
1
answer
338
views
Sitecore VS project configuration for Unicorn serialization
I have a new Sitecore SXA solution in VS 2017 that follows Helix best practices with Unicorn Serialization. Our Sitecore 9.3 runs in a docker container. I created a first site - EA - in Sitecore CMS ...
0
votes
1
answer
74
views
Ruby searching template on old/not existant release
I'm using ruby on rails and I'm sending notifications to the user using a gem called UserNotifier.
Lately I tried to change the templates of those notifications, but the sent emails did not change at ...
1
vote
0
answers
163
views
Unable to start Unicorn(EC2×Nginx×Unicorn)
Overview
I making production environment with AWS(EC2)+Nginx+Uniconr on myRailsApp.
I completed connection to EC2 and Nginx setting,Unicorn setting.
But I can't start to Unicorn.
I tried unicorn ...
1
vote
1
answer
288
views
ActionCable with SSL not working in production environment
I am using ActionCable in rails 5.2 and deployed the code on AWS with nginx server.
Previously WebSocket was working when I was working on http but when i have implemented SSL, it stopped working. For ...
0
votes
1
answer
29
views
How do I run a function in only one thread in a multi-threaded Unicorn Sinatra server?
I put my cron task in a module, and then in my Sinatra server.
module Cron
scheduler = Rufus::Scheduler.new
scheduler.every "30m", :first => :now do
run_cmd('git pull')
puts "pulled ...
0
votes
0
answers
40
views
How do I turn off error details in Unicorn?
I'm using Ruby and Unicorn for developing my web pages. When there's an error in my page Unicorn displays a page detailing the error and the lines in my code where the error occurs. That's fine for ...
0
votes
1
answer
90
views
unicorn-worker-killer- why is it a problem if multiple Unicorn workers are killed at the same time?
From the unicorn-worker-killer README, I see the following comment in the notes about the Unicorn::WorkerKiller::Oom module:
memory_limit_min and memory_limit_max specify the min and max of
...
1
vote
0
answers
112
views
In Gitlab's "config.ru", why "require 'unicorn'" if it's already defined?
I'm doing a deep-dive into how Gitlab's web application works, and I'm starting by looking at the webserver it uses (Unicorn). The config.ru file looks like the following:
if defined?(Unicorn)
...
1
vote
0
answers
497
views
ruby unicorn as service in docker - uses wrong rake
my problem is that i can start unicorn as a service in docker, though it works just fine if i start it from command line.
trying to build ruby with unicorn and nginx web server docker image.
using as ...
0
votes
1
answer
321
views
monit and unicorn restart command not working in rails 5.2 application
I configured Monit to watch unicorn and restart it when the memory exceeded or the cpu increased above a certain limit ,
how ever when it happens , monit doesn't restart unicorn , and here is the ...
0
votes
0
answers
141
views
Selenium web driver issue with rails server
I am facing a very wired issues, with selenium driver and webdrivers. you can see snippet of codebase that I am using.
But main issues is that this code working fine at some places like local server, ...
0
votes
0
answers
162
views
`127.0.0.1' is not a valid domain
I have a rails application running on Nginx server and unicorn as an application server. All of the requests process fine but I am getting an error of `127.0.0.1' is not a valid domain after every ...
0
votes
0
answers
237
views
Rails app deploying with unicorn and Nginx can't load static resources on Kubernetes infraestructure
I'm trying to deploy a Rails application using Kubernetes ... the main container of my application is built using ruby 2.5.5 + unicorn ... I used Mongo as DB ... the container works well because I ...
1
vote
0
answers
366
views
Rails slow only with Unicorn / Puma
Running rails 5.0.x, Ruby 2.6.3. And I am having performance problems very specifically when using Unicorn or Puma. Upgrading Rails is going to be quite some work but that's going to be the next thing ...
0
votes
1
answer
211
views
where to save the unicorn PIDS and sockets path as the folders gets dissappers after mina deploy rails app
I have set up a server for deploying my rails app. I am not able to start unicorn service. It is giving me a failed status. I am totally new to this. So as per this tutorial https://www.digitalocean....
1
vote
0
answers
120
views
uninitialized constant Devise (NameError) unicorn
I deployed my rails app with capistrano to digitalocean and after adding new gem gem 'devise_token_auth', '1.0.0' after deploying I faced strange issue in unicorn log. It is bellow
E, [2019-05-...
1
vote
1
answer
177
views
Rails: Is it possible to auto adjust unicorn worker processes quantity?
I have a rails app running on unicorn & NGINX app&web server.
Whenever the system is booted, unicorn is started with the required number of workers which is defined in the config/unicorn.rb ...
1
vote
1
answer
332
views
Unicorn fcntl: Errno::EPERM: Operation not permitted
I've been running Rails application on Unicorn 5.5.5 and on certain environments it throws an exception which reads
bundler: failed to load command: unicorn (/usr/local/bundle/bin/unicorn)
Errno::...
-1
votes
1
answer
122
views
unicorn production configuration
I see my unicorn error file growing, and I can't find out why.
It log some path but when I try them on my browser, I don't see any issue neither redirection.
I'm using rails and this is a snippet of ...
2
votes
2
answers
3k
views
Unicorn Refreshing Gem List
Guys I'm trying to restart my unicorn service and seems it get stuck on this
[2019-03-06T20:45:05.938802 #7614] INFO -- : Refreshing Gem list
/usr/local/rvm/gems/ruby-2.5.1@citius_artis/gems/unicorn-...
0
votes
1
answer
259
views
How to match unicorn with rails 4.2.11
The ruby program worked well before at version 2.1.11, but new bundler requires ruby version >= 2.3. So I upgrade ruby version to 2.4.5, bundler 1.17.3, rails version to 4.2.11, nokogiri to 1.7.2, ...
0
votes
1
answer
292
views
What to do When Unicorn Type Error Happened in Ruby 2.4
I upgrade ruby from 2.1 to 2.4(ruby24, ruby24-devel), bundler(version: 1.17.3), nokogiri(version: 1.6.8), rails(version: 4.0.1), unicorn(version: 5.0.1), therubyracer(version: 0.12.3).
There are ...