Submit a ticket My Tickets
Welcome
Login  Sign up

Web Server v1.4.1 Upgrade Preparation

Certain customers with large databases (e.g., 10 million+ license plates) should perform a preparation step prior to upgrading to version 1.4.1.  To check if this is applicable:

 

1. SSH to your On-Premises web server
2. Run the command dpkg -l | grep openalpr-web

If the version is < 1.4.1, you should prepare for upgrading using the following process:

 

1. Run the command: openalpr-web-manage dbshell

2. Copy and paste the following block into the SQL terminal.  This may take hours to complete.  Your web server will not be taken down during this operation, however performance may be impaired:

ALTER TABLE `front_alprgroup` ADD COLUMN `crop_location` smallint NULL,
ADD COLUMN `gps_latitude` numeric(12, 6) NULL,
ADD COLUMN `gps_longitude` numeric(12, 6) NULL,
ADD COLUMN `img_height` smallint NULL,
ADD COLUMN `img_width` smallint NULL,
ADD COLUMN `plate_x1` smallint NULL,
ADD COLUMN `plate_x2` smallint NULL,
ADD COLUMN `plate_x3` smallint NULL,
ADD COLUMN `plate_x4` smallint NULL,
ADD COLUMN `plate_y1` smallint NULL,
ADD COLUMN `plate_y2` smallint NULL,
ADD COLUMN `plate_y3` smallint NULL,
ADD COLUMN `plate_y4` smallint NULL,
ADD COLUMN `processing_time_ms` numeric(6, 2) NULL,
ADD INDEX `front_alprgroup_company_id_gps_latitude_g_ca3b9e9c_idx` (`company_id`, `gps_latitude`, `gps_longitude`);

3. After this completes, exit the terminal with \q

4. Upgrade the webserver normally with: bash <(curl https://deb.openalpr.com/install)

 

 

If your database is extremely large, you may need to modify the following options in order to allow the upgrade to continue:

 

edit /etc/mysql/conf.d/mysql.cnf and add:

[mysqld]
innodb_buffer_pool_size=4G

 

Then restart MySQL with:

sudo /etc/init.d/mysql restart

 

Temporarily disable the clean-db script by moving it somewhere else.  For example:

sudo mv /etc/cron.daily/openalpr-cleandb /root/

 

After the database upgrade completes, move it back with:

sudo mv /root/openalpr-cleandb /etc/cron.daily/

P
Patti is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.