Tidb-lightning Import Error: context deadline exceeded

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb-lightning 导入报错context deadline exceeded

| username: lanranguidao

[TiDB Usage Environment] Testing
[TiDB Version] v7.5.0
[Reproduction Path]
[Encountered Issue: Problem Phenomenon and Impact]
Successfully exported MySQL data using tiup dumpling, with a data volume of 900G. However, encountered an error when importing into TiDB using tidb-lightning.

[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page

[Attachments: Screenshots/Logs/Monitoring]

| username: Kongdom | Original post link

I saw in other posts that this error might be caused by a timeout due to too many tables.

You can also refer to this:

| username: changpeng75 | Original post link

It seems that the timeout was caused by an excessively long operation time. Is there a setting in the server configuration to close the connection after being idle for too long?

| username: lanranguidao | Original post link

It seems that the referenced post didn’t get resolved in the end.

| username: lanranguidao | Original post link

There is no setting, where can I set it?

| username: Kongdom | Original post link

I looked at other posts again, it might be the timeout caused by having too many tables. Approximately how many tables?

| username: tidb狂热爱好者 | Original post link

It’s TiDB that’s not working. Post the TiDB architecture; it is very likely an architecture issue.

| username: lanranguidao | Original post link

320 tables

| username: lanranguidao | Original post link

The image is not visible. Please provide the text you need translated.

| username: Kongdom | Original post link

:thinking: Only one TiKV?

| username: lanranguidao | Original post link

Yes, I don’t have much disk space, so I just want to set up one TiKV.

| username: Kongdom | Original post link

Are you using logical import or physical import?

| username: lanranguidao | Original post link

This file

| username: Kongdom | Original post link

So that’s physical import. Does it meet these necessary conditions and limitations?

| username: lanranguidao | Original post link

No one uses the database, it’s a new environment, and there’s only one instance of Lightning, with no concurrency.

| username: changpeng75 | Original post link

You can refer to MySQL’s handling method
https://blog.51cto.com/u_16213459/9299744

| username: tidb狂热爱好者 | Original post link

It seems like the disk is not working. TiKV must use SSD, specifically local SSDs, and cannot use cloud disks. You might have purchased from Alibaba Cloud or Tencent Cloud.

| username: tidb狂热爱好者 | Original post link

If on the cloud, be sure to pay attention to disk performance. Cloud SSDs do not meet the requirements.

| username: lanranguidao | Original post link

I am using v3700 centralized storage, not solid-state. Can’t it be used if it’s not solid-state?

| username: lanranguidao | Original post link

I’ll give this a try. I’ll increase the timeout settings and see how it goes.