삽질/개발,엔지니어링 52

리눅스 스왑 설정

sudo fallocate -l 4G /mnt/storage_5th/swapfile_4G sudo chmod 600 /mnt/storage_5th/swapfile_4G sudo mkswap /mnt/storage_5th/swapfile_4G sudo swapon /mnt/storage_5th/swapfile_4G 8기가 중에 500메가도 안 썼는데 팰월드 때문에 메모리가 너무 부족해서 스왑 설정을 했다. 남는 MSATA SSD 끼우고 4G로 잡았다. 어른의 사정으로 인해 fstab에 설정 안 하고 rc.local에 부팅시에 디스크 마운트 하고 sudo swapon /mnt/storage_5th/swapfile_4G 이거 하게 추가 함.

mysql table 복구 (repair table)

테이블 하나가 손상 되었는지 조회가 너무 오래 걸렸다. mysql> select * from 테이블 where 컬럼 = '조건'; ------- 1 row in set (49.88 sec) mysql> select count(*) from 테이블; +----------+ | count(*) | +----------+ | 1540 | +----------+ 1 row in set (13.06 sec) 1,540건 있는 데이터 전체 조회에 13초. 인덱스 걸린 거 하나 가져오는데 49초. 문제 있나 확인해 보면 멀쩡하다고 나옴. mysql> check table 테이블; +-------------------------+-------+----------+----------+ | Table | Op | Msg_..

클릭하우스에서 실행 쿼리가 종료 되지 않을 때

클릭하우스에 ALTER 요청시 오류가 나고 있었다. clickhouse_driver.errors.ServerException: Code: 159. DB::Exception: Watching task /clickhouse/task_queue/ddl/query-0000363944 is executing longer than distributed_ddl_task_timeout (=180) seconds. There are 1 unfinished hosts (0 of them are currently active), they are going to execute the query in background. Stack trace: 0. DB::Exception::Exception(DB::Exception::Mes..

PostgreSQL JSONB 인덱스 생성 전후 성능 확인

https://medium.com/geekculture/postgres-jsonb-usage-and-performance-analysis-cdbd1242a018 Postgres JSONB Usage and performance analysis This story focuses on various features that JSONB provides and formulated with a sample and explained with scenarios where unstructured… medium.com 무슨 데이터가 들어올지 모르는 상황이라 JSONB를 쓰는 게 좋을 거 같아서 확인 했다. 테스트에 사용한 데이터는 1,000만 건이고, 사용한 데이터는 https://dummyjson.com/users?l..

[n8n] HTTP Request 반복 실행

n8n이 python을 지원하게 되면서 시험 삼아 기존에 에어플로우에서 처리하던 걸 옮겨 보기로 했다. ClickHouse > 가공 > API 호출 기존에 API 호출시 반복문으로 하던 부분을 어찌 해야 하는지 모르겠어서 검색을 해보니 https://community.n8n.io/t/looping-http-request-node/420/5 Looping http request node Hi Jan. I am having this problem. I’m not sure how to easily set the URL as an expression so that the http request changes the URL id on each iteration. For example if what I’m pass..

python pandas로 csv 읽기

* 결국엔 하자가 많아서 php fgetcsv로 처리함. 천만 건 정도 되는 데이터를 csv로 받아서 json으로 변경 해서 카프카에 전송 해야 했다. import csv를 썼는데, 두 줄을 한 줄로 읽음........... 다른 언어 쓸까 하다가 이미 코드 짜놓은 게 아까워서 파이썬 물고 늘어지기로 하고 pandas로 함. import pandas ... csv_data = pandas.read_csv(csv_file, names=cols, low_memory=False) data = csv_data.to_dict() cols = ["no","reception","user_id","inquiry_type1","content","write_datetime","update_datetime","write_g..

failed post-install: timed out waiting for the condition

실서버에 에어플로우를 설치하려고 하니 해당 오류가 발생. client.go:773: [debug] airflow-run-airflow-migrations: Jobs active: 1, jobs failed: 0, jobs succeeded: 0 W0530 19:16:15.686219 23727 reflector.go:456] k8s.io/client-go@v0.27.1/tools/cache/reflector.go:231: watch of *unstructured.Unstructured ended with: an error on the server ("unable to decode an event from the watch stream: stream error: stream ID 293; INTERNAL_..

NAS에 하드디스크 추가

딱히 필요는 없는데 NAS에 디스크 베이가 하나 남은 게 계속 생각이 나서 그냥 샀다. 세상 좋아졌다. 해외 구매인데 일 주일도 안 돼서 왔음. 디스크 끼우고 파티션 생성 # fdisk /dev/sdf Welcome to fdisk (util-linux 2.37.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. The size of this disk is 7.3 TiB (8001563222016 bytes). DOS partition table format..

반응형