Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 미중
- 전염병
- 봉준호감독통역
- 코로나바이러스
- 치앙마이
- 최성재
- 우한
- 확진자수
- 창궐
- wuhan
- 조현병
- 어서와한국은처음이지
- Bolton
- sharonchoi
- 우한코로나바이러스
- 웨일즈
- red hearse
- 우한코로나
- 필리핀사망
- 신종코로나
- parasite
- 코로나
- everybody wants you
- 진짜영웅
- cnn
- 중국외교부
- 정은경 본부장님
- 봉준호감독통역사
- 우한 코로나
- 코로나19
Archives
- Today
- Total
오지's blog
sqlalchemy-error-mysql-server-has-gone-away 본문
728x90
반응형
mysql의 소스에서 snowflake의 target으로 데이터를 가져와 적재는 하는데 target에 그 해당날짜에 있는 데이터는 snowflake client를 통해서 삭제 하고 mysql의 데이터를 가져와 적재하였다.
그런데 아래와 같이
MySQL server has gone away (ConnectionResetError(104, 'Connection reset by peer'))
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2006, "MySQL server has gone away (ConnectionResetError(10054, '현재 연결은 원격 호스트에 의해 강제로 끊겼습니다', None, 10054, None))")
이 에러가 발생하였다. sqlalchemy에서 다음 파라미터만 추가하면 되는 문제 였다.
pool_pre_ping=True
아래는 참고페이지이다.
https://codehunter.cc/a/flask/sqlalchemy-error-mysql-server-has-gone-away
SQLAlchemy error MySQL server has gone away
Looking at the mysql docs, we can see that there are a bunch of reasons why this error can occur. However, the two main reasons I've seen are: 1) The most common reason is that the connection has been dropped because it hasn't been used in more than 8 hour
codehunter.cc
'개발노트 > Python' 카테고리의 다른 글
xlsx파일 읽을때 zipfile.BadZipFile: File is not a zip file 에러 발생 (0) | 2022.08.11 |
---|---|
selenium으로 xpath로 접근시 에러 발생하면 의심해볼만한것. (0) | 2022.08.04 |
s3의 특정 버킷내 파일 모두 다운로드(boto3이용) (0) | 2022.05.02 |
windows에서 pyspark 실행시 지정된경로를 찾을수 없습니다 라고 에레메시지가 나올때.. (0) | 2022.04.27 |
11 Tips And Tricks To Write Better Python Code(작성중) (0) | 2022.04.25 |
Comments