create video error

alt=
DannyA
@dannya
10 years ago
584 posts
my video is failing to create and i'm seeing the following error in apache log

[Wed May 28 03:45:55 2014] [warn] [client 64.131.184.13] mod_fcgid: read data timeout in 41 seconds, referer: http://dev.xtraxx.com/video/create
[Wed May 28 03:45:55 2014] [warn] [client 64.131.184.13] (110)Connection timed out: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://dev.xtraxx.com/video/create
updated by @dannya: 07/18/14 10:26:01AM
michael
@michael
10 years ago
7,718 posts
There is a lot of discussion about "mod_fcgid: read data timeout in 31 seconds" in this thread:
http://www.virtualmin.com/node/19879

along with a few things to try to allow the script to execute.
brian
@brian
10 years ago
10,148 posts
There's likely a CGI timeout setting that you are going to need to adjust so the PHP process can run longer while it is converting video.

If you are the only site on the server, I would highly recommend that you do not use mod_fcgid to run your PHP - that's the slowest way you can run PHP. Use Apache with mod_ruid2.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 05/28/14 11:23:19AM
alt=
DannyA
@dannya
10 years ago
584 posts
We switched to mod_ruid2 and have started having significant db connection problems. Getting allot of errors:CRI: Query Error: Lost connection to MySQL server during queryā€¯

Not sure if its a coincidence. My sysadmin has been trying to troubleshoot and asked to check the following:




The issue with lost DB connections needs to be investigated from both sides - our and developers'. Please ask your developers to read my report as well.

First of all, I have to notice that mentioned error occurs not only during the Integrity Check. I've enabled detailed logs for MySQL service and see that it keeps appear intermittently while I'm navigating the admin interface of your website.

So, here is the exact error from MySQL log that we are talking about:

140617 1:32:22 [Warning] Aborted connection 321 to db: 'dev' user: 'dev' host: 'localhost' (Got an error writing communication packets)

numbers of connection ID and timestamps are always different, obviously.

According to the official documentation of MySQL there are several possible reasons of this error. Please take a look at the following page http://dev.mysql.com/doc/refman/5.5/en/communication-errors.html and please ask your developers to read it as well.
All possible reasons of this issue may be divided into three groups:

1. Configuration limits of MySQL service
Here are the related configuration directives, which may be related to the issue, and their current values after my adjustments. Also with short comments.

connect_timeout = 60 # The number of seconds that the mysqld server waits for a connect packet
max_allowed_packet = 20971520 # The maximum size of one packet or any generated/intermediate string (in bytes)
interactive_timeout = 28800 # The number of seconds the server waits for activity on an interactive connection before closing it
wait_timeout = 28800 # The number of seconds the server waits for activity on a noninteractive connection before closing it

The total amount of errors has been reduced after my changes, so this helped only partially. But the nature and behavior of errors occurrence now makes me think that listed directives are no longer the reason.
2. Lack of resources for MySQL on the server
This also may be a reason of that error, when MySQL is limited in CPU usage or memory for example. But I don't see any warnings about resources lack in the logs and overall system monitoring does not show anything related.
3. Application-related problem
Let me cite the advices from MySQL documentation here. Possible reasons are:
- The client program did not call mysql_close() before exiting;
- The client program ended abruptly in the middle of a data transfer.
We will be waiting for your further comments and developers answer.
michael
@michael
10 years ago
7,718 posts
Do you have a way to consistently reproduce the error so that I can try it out here? I've not run into that error yet.
brian
@brian
10 years ago
10,148 posts
andersda:
We switched to mod_ruid2 and have started having significant db connection problems. Getting allot of errors:CRI: Query Error: Lost connection to MySQL server during query

This is not related to mod_ruid2. We run mod_ruid2 on all of our servers, and never see this, so you've got something else going on with your server that you're system admins are going to want to track down (it's not JR).

this:

Got an error writing communication packets

looks like a network issue/interface/firewall. issue to me.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
switched back to fcgi and issue went away.
Serge (SX)
Serge (SX)
@serge-sx
10 years ago
3 posts
Hello,

We are working with @andersda on this issue from server side. We definitely sure that this is not a network/firewall issue (for valuable reasons). But we believe that this might be some issue with MySQL configuration limits.

brian:
This is not related to mod_ruid2. We run mod_ruid2 on all of our servers, and never see this

Could you please show us an example of MySQL config from one of these servers?

Thank you!
__
Serge
michael
@michael
10 years ago
7,718 posts
Here is my /etc/mysql/my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld]
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = 127.0.0.1
#
# * Fine Tuning
#
key_buffer              = 256M
max_allowed_packet      = 32M
thread_stack            = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
table_cache             = 1536
tmp_table_size          = 128M
max_heap_table_size     = 128M
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 32M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries       = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id              = 1
#log_bin                        = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
max_binlog_size         = 100M
#binlog_do_db           = include_database_name
#binlog_ignore_db       = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
innodb_buffer_pool_size = 512M
innodb_flush_method     = O_DIRECT
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet      = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer              = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#

updated by @michael: 06/17/14 10:53:13PM
Serge (SX)
Serge (SX)
@serge-sx
10 years ago
3 posts
@michael thank you!

Could you please also let us know what PHP and Apache versions are used with mod_ruid2 on your servers?

We have PHP 5.4.27 and Apache/2.2.15
michael
@michael
10 years ago
7,718 posts
Have you seen the step-by-step instructions for setting up a server on Digital Ocean? Those are the ones I followed:

"High Performance Jamroom on Digital Ocean"
https://www.jamroom.net/the-jamroom-network/blog/23/high-performance-jamroom-on-digitalocean

Php version
$ php -v
PHP 5.5.9-1ubuntu4 (cli) (built: Apr  9 2014 17:11:57) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

Apache version:
$ apache2 -v
Server version: Apache/2.4.7 (Ubuntu)
Server built:   Apr  3 2014 12:20:28

I installed on top of ubuntu server 14.04 LTS (64bit)
Serge (SX)
Serge (SX)
@serge-sx
10 years ago
3 posts
Thank you very much @michael, we will consider provided info.
michael
@michael
10 years ago
7,718 posts
Love your avatar @serge-sx :) cute wombat.

Tags