Vitess beginner in need of help. (timeouts)

530 views
Skip to first unread message

Charles Shapiro

unread,
Jul 15, 2018, 5:06:14 AM7/15/18
to vitess
Hi.

Just starting with porting an existing java app to work with vitess.

The application is failing after running well for a short time, with the error:

vttablet: rpc error: code = Aborted desc = transaction 1531304705518655282: ended at 2018-07-12 08:34:16.287 UTC (exceeded timeout: 30s) (CallerID: mysql_user)

How do I change that timeout to a very high value ?

--Charles Shapiro

Sugu Sougoumarane

unread,
Jul 15, 2018, 1:11:43 PM7/15/18
to vit...@googlegroups.com
Hi there,

You probably need to increase the query and transaction timeouts on vttablet: https://vitess.io/user-guide/server-configuration/#query-server-parameters.

These settings are for the 'oltp' workload, which limits not only query time, but also result size.

If you want to run queries that return large results, you need to set workload='olap'.

--
You received this message because you are subscribed to the Google Groups "vitess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vitess+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Charles Shapiro

unread,
Jul 16, 2018, 4:15:46 AM7/16/18
to vitess
Sugu,

Thank you.

That worked.

Now I'd like to know how to implement a different vttablet topology.

Currently, I've been testing with vitess/base using /vt/src/vitess.io/vitess/examples/local/vttablet-up.sh restricted to two mysqls/two vttablets
The mysqld that comes in the docker is apparently 5.7.21

I'd like to test it with a single percona 5.6, running on the main OS outside of the docker.

I suspect that modifying the vttablet-up.sh script for this is probably a bad idea, and instead I should just have a simple startup script that calls /vt/bin/vttablet with the appropriate parameters (and doesn't try to startup mysql) with the percona data directory bind mounted onto the docker.

With the current setup, one of the vttablet processes looks like :

/vt/bin/vttablet -topo_implementation zk2 -topo_global_server_address localhost:21811,localhost:21812,localhost:21813 -topo_global_root /vitess/global -log_dir /vt/vtdataroot/tmp -tablet-path test-0000000100 -tablet_hostname  -init_keyspace xyzxyz -init_shard 0 -init_tablet_type replica -health_check_interval 5s -enable_semi_sync -enable_replication_reporter -backup_storage_implementation file -file_backup_storage_root /vt/vtdataroot/backups -restore_from_backup -queryserver-config-query-timeout 30000 -queryserver-config-transaction-timeout 30000 -queryserver-config-max-result-size 1999999999 -queryserver-config-transaction-cap 300 -port 15100 -grpc_port 16100 -service_map grpc-queryservice,grpc-tabletmanager,grpc-updatestream -pid_file /vt/vtdataroot/vt_0000000100/vttablet.pid -vtctld_addr http://cd81b08c834d:15000/ -db-config-dba-uname vt_dba -db-config-dba-charset utf8 -db-config-app-uname vt_app -db-config-app-dbname vt_xyzxyz -db-config-app-charset utf8 -db-config-appdebug-uname vt_appdebug -db-config-appdebug-dbname vt_xyzxyz -db-config-appdebug-charset utf8 -db-config-allprivs-uname vt_allprivs -db-config-allprivs-dbname vt_xyzxyz -db-config-allprivs-charset utf8 -db-config-repl-uname vt_repl -db-config-repl-dbname vt_xyzxyz -db-config-repl-charset utf8 -db-config-filtered-uname vt_filtered -db-config-filtered-dbname vt_xyzxyz -db-config-filtered-charset utf8

If I wish to change it to a single percona 5.6 database with the datadir mounted to /my56datadir/ , what parameters would I need to use/change ?

--Charles Shapiro

Charles Shapiro

unread,
Jul 16, 2018, 4:22:29 AM7/16/18
to vitess
Sugu,

That worked, but now I'm getting stopped about 25 minutes later with:
vttablet: rpc error: code = ResourceExhausted desc = transaction pool connection limit exceeded (CallerID: mysql_user)

I tried raising the queryserver-config-transaction-cap setting, but it didn't seem to help.  It still failed when starting processing on the second datafile.

Any hints on raising the limit here?


On Sunday, July 15, 2018 at 8:11:43 PM UTC+3, Sugu Sougoumarane wrote:

Sugu Sougoumarane

unread,
Jul 16, 2018, 6:23:12 PM7/16/18
to vit...@googlegroups.com
transaction cap is the correct setting to increase. You may need to increase it to something much higher. It depends on the number of simultaneous transactions you'll be running.

You can hit /debug/vars on the vttablet. One of the variables there should show you the uitlization of each pool.

Make sure you conclude transactions with an explicit commit or rollback. Otherwise, they'll linger and occupy a connection till the transaction timeout.
Reply all
Reply to author
Forward
0 new messages