Running Processes
Related cards:
Too many parallel test processes may amplify flaky tests
By default parallel_tests will spawn as many test processes as you have CPUs. If you have issues with flaky tests, reducing the...
Linux: Running a single unique instance of command + arguments
run-one
is a wrapper script that won't run the given command while another instance of it is running. Is brings several utility commands that offer similar behavior.
NAME
run-one - run just one instance at a time of some command and...
Running Rspec examples by name, or: Running a single shared example
When an Rspec example fails, I usually investigate by running that example again using rspec <file:line>
. However, this does not work with shared examples, since Rspec doesn't know in which context the shared example should be run.
But there is...
Threads and processes in a Capybara/Selenium session
TLDR: This card explains which threads and processes interact with each other when you run a Selenium test with Capybara. This will help you understand "impossible" behavior of your tests.
When you run a Rack::Te...
Web Operations 101 For Developers
This post is not about devops, it's not about lean startups, it's not about web scale, it's not about the cloud, and it's not about continuous deployment. This post is about you, the developer who's main purpose in life has always been to build gr...
MySQL/MariaDB: Hide all sleeping processes in processlist
If you have many connections to your MySQL or MariaDB (as we have) you might want to filter the list you see when running a SHOW PROCESSLIST
. To hide all sleeping processes, you can simply use grep
as your pager:
\P grep -v "| Sleep"
The...
Regular tasks for long-running projects
When projects run for many years, they require special regular maintenance to stay fresh. This kind of maintenance is usually not necessary for small or quick projects, but required to keep long-running projects from getting stale.
You should be ...
no passenger served applications running error when deploying via capistrano
When deploying with capistrano it's possible you get this "error" message:
*** [err :: example.com] There are no Phusion Passenger-served applications running whose paths begin with '/var/www/example.com'.
*** [err :: example.com]
This ...
Linux: Find out which processes are swapped out
Processes in Linux might be put into Swap ("virtual memory") occasionally.
Even parts of a single process might be removed from memory and put into Swap.
In order to find out which processes remain within Swap, run this:
sudo grep VmSwap /pr...
Using screen for long running tasks
Screen is great for long running tasks, where you want to log in every few hours and days and keep your session alive indefinitely.
To create a new screen, do
screen -Rd screenname
This will also reattach an existing screen with that name.
...