The IP Section — Stream the First Four Episodes

The IP Section — Stream the First Four Episodes

by Dennis Crouch

I first worked with Wes Austin back in 2006 as he developed his Dunes CLE program and later followed with some interest his Utah-based patent firm Austin-Rapp.  As the image shows below, Austin has expanded from patent law into comedy as well.  His new sitcom – THE IP SECTION – merges the two (as well as Mormonism) and stars a patent lawyer who wants to be a stand-up comedian.

Watch the series here:

  1. The first four episodes are available for streaming on YouTube: https://www.youtube.com/channel/UC6bg3TGN_3hn628xD_1h0ww
  2. Austin also made a video of the back-story: https://www.facebook.com/theipsection/videos/251584812287074/

Do any of your experiences as a patent attorney or inventor fit easily into a comedy routine?

via Patent Law Blog (Patently-O)
The IP Section — Stream the First Four Episodes

Build Your Own Glock Series with TFB

The Firearm Blog has partnered with Lone Wolf Distributors to bring you a series on building your own Glock. Buying an 80% receiver is not new to the gun industry. Glocks are the rage, why not build one the way YOU want it? Get yourself a hot gat, and loose that Fudd factory gun. Get that sweet trigger in there, and pay no attention to the factory fanboys. (Factory purest click here)

I looked at my Gen 2 Glock 21 and figured she is probably ready to retire to safe queen status, therefore, clearly time for my next Glock. I already own a (cough) number of Glocks, but I decided this has to be a hot gat. Rather than paying top dollar for a pimped out Glock, I want to build exactly what I want the way I want.

Taking an 80% receiver is perfectly legal, and surprisingly common. I know of a retired military operator who has built a half dozen and working on another. In this series, I will be building my pimped out        Glock 19. RMR ready and eventually suppressed.

So dear reader hit that link below, visit Lone Wolf, get yourself an 80% receiver and join us for this surprisingly easy adventure in building yourself a Glock. If it is for a Glock, these guys have it.

Everything you will ever need for your Glock. Check them out.

 What You Will Need

  • 80% polymer Frame Kit (here) Lone Wolf will also supply you with a “completion kit” that will throw in everything you need for the lower (see here)
  • Slide
  • Slide completion kit (see here)
  • Barrel
  • Drill Press

The 80% frame will arrive in the jig you will use to remove the material to bring the frame to 100%. It also ships with the drill bits required. I will go over all of this in the series, step by step.

Next addition I will briefly address the legality, as I sat down with an ATF agent before I started. A very cool guy who helped me out with pitfalls people run into. Then I will start creating my new sweet non-factory Glock.

I know there a lot of you who have already built up an 80% frame. What do you think? How was your experience? Let us know below

 

Lone Wolf THE leading Glock accessory supplier – (Click here)


We are committed to finding, researching, and recommending the best products. We earn commissions from purchases you make using the retail links in our product reviews.

Learn more about how this works

.

via The Firearm Blog
Build Your Own Glock Series with TFB

MySQL Error: Too many connections!

When your application get error "too many connections" underlying problem might be caused by multiple things.

In this blog we will investigate why and how to solve these problems when running MySQL installed on Debian/Ubuntu using systemd (default MySQL packages).

OS: Debian 9
MySQL Server version: 5.7.25 MySQL Community Server (GPL)
(will most likely be the same for MySQL 8.0 versions)

Goal is to have 10.000 working connections to MySQL!

The default value for max_connections is 151 connections so first step is to increase the max_connections variable to 10.000.
This is documented in the manuals here:
– https://ift.tt/23yLjHw
– https://ift.tt/2FNe7om

The max_connections is a dynamic setting so lets increase value to 10.000 and see what happens.

root@debian:~# mysql -uroot -proot -se "select @@max_connections"
@@max_connections
214

Hmmm, it looks like we only got 214 connections, lets look at the error log:

2019-04-01T06:29:48.301871Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 50000)
2019-04-01T06:29:48.302000Z 0 [Warning] Changed limits: max_connections: 214 (requested 10000)
2019-04-01T06:29:48.302004Z 0 [Warning] Changed limits: table_open_cache: 400 (requested 2000)

Looks like we hit some resource limit.
Lets look in the MySQL manual for running MySQL under systemd, that can be found here.
Looks like we need to increase the number of allowed open files for MySQL, locate the systemd configuration file for MySQL and create the /etc/systemd/system/mysqld.service.d/override.conf (file can be called anything ending with .conf).

Add LimitNOFILE=10000 in file override.conf like:

root@debian:~# cat /etc/systemd/system/mysql.service.d/override.conf
[Service]
LimitNOFILE=10000

After this we need to reload the systmed daemon and restart the MySQL service like:

root@debian:~# systemctl daemon-reload
root@debian:~# systemctl restart mysql

MySQL is now saying we have 9190 connections:

root@debian:~# mysql -uroot -proot -se "select @@max_connections"
@@max_connections
9190

So, MySQL is using some files for additional work and we need to set this a bit higher to get 10.000 connections, lets set it to 11.000 and reload the systemd daemon and restart the MySQL service.

root@debian:~# mysql -uroot -proot -se "select @@max_connections"
mysql: [Warning] Using a password on the command line interface can be insecure.
@@max_connections
10000

Good, now we have 10.000 connections available according to MySQL.

Lets run our application and verify we can get 10.000 connections, I use this small perl script to open 10.000 connections.

Just below 5.000 connection I get a new error in the application "Can’t create a new thread (errno 11)"
Lets have a look at the MySQL error log:

root@debian:~# tail -1 /var/log/mysql/error.log
2019-04-01T06:50:35.657397Z 0 [ERROR] Can’t create thread to handle new connection(errno= 11)

I found this new limit by running command below when perl script was running:
watch -n.5 "mysql -uroot -proot -se’show status like \"%threads%\"’"

Strange, where is this new limitation just below 5.000 connections coming from?

Looking at resource limits for my MySQL daemon I should have close to 8000 processes:

root@debian:~# cat /proc/$( pgrep -o mysql )/limits
Max processes             7929                 7929                 processes
Max open files            11000                11000                files

Lets looks at status report for my MySQL service:

root@debian:~# systemctl status mysql | grep Tasks
    Tasks: 127 (limit: 4915)

There seem to be some additional limit on Tasks that limit me to 4915 connections.
Lets expand our override.conf configuration to cover for 11.000 tasks also.

root@debian:~# cat /etc/systemd/system/mysql.service.d/
[Service]
LimitNOFILE=11000
TasksMax=11000

(remember to reload systemd and restart MySQL service after each change in override.conf)

Now we got just under 8.000 connection and got the same error " Can’t create a new thread (errno 11)" but this time it’s because of the limit of max processes:

root@debian:~# cat /proc/$( pgrep -o mysql )/limits
Max processes             7929                 7929                 processes

Lets increase this limit to 11000 in our override.conf:

root@debian:~# cat /etc/systemd/system/mysql.service.d/override.conf and
[Service]
LimitNOFILE=11000
LimitNPROC=11000
TasksMax=11000

After reloading systemd configuration and restarting MySQL service I can now get
10.000 connections and the perl script runs without any errors!

Summary:
There are different limits when setting max_connections in MySQL:
– The default max connections is 151.
– At 214 connections you are limited by max open files.
– At 4915 you are limited by Max Tasks (systemd)
– Just below 8000 you are limited by max number of processes

By adding a override file (as showed above) you can overcome all these limits.

Remember to:
Look at error message in application and MySQL error logs.
Look at output from: cat /proc/$( pgrep -o mysql )/limits
Look at output from: systemctl status mysql
Test your application (or use my perl script) and monitor that it works!
Monitor how many connections you have: watch -n.5 "mysql -uroot -proot -se’show status like \"Threads_connected\"’"

via Planet MySQL
MySQL Error: Too many connections!