{"id":118892,"date":"2025-09-03T16:35:41","date_gmt":"2025-09-03T09:35:41","guid":{"rendered":"https:\/\/tino.vn\/blog\/?p=118892"},"modified":"2026-10-23T18:30:00","modified_gmt":"2026-10-23T11:30:00","slug":"tai-sao-workflow-trong-n8n-chay-cham","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/tai-sao-workflow-trong-n8n-chay-cham\/","title":{"rendered":"T\u1ea1i sao workflow trong n8n ch\u1ea1y ch\u1eadm? 8 nguy\u00ean nh\u00e2n v\u00e0 c\u00e1ch kh\u1eafc ph\u1ee5c"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Workflow n8n ch\u1ea1y ch\u1eadm th\u01b0\u1eddng do m\u1ed9t trong b\u1ed1n nh\u00f3m: m\u00e1y ch\u1ee7 thi\u1ebfu RAM ho\u1eb7c CPU, workflow x\u1eed l\u00fd qu\u00e1 nhi\u1ec1u item trong m\u1ed9t l\u1ea7n, c\u01a1 s\u1edf d\u1eef li\u1ec7u ph\u00ecnh v\u00ec d\u1eef li\u1ec7u th\u1ef1c thi, v\u00e0 API b\u00ean ngo\u00e0i ph\u1ea3n h\u1ed3i ch\u1eadm. Xem tab Executions \u0111\u1ec3 bi\u1ebft node n\u00e0o t\u1ed1n th\u1eddi gian nh\u1ea5t, r\u1ed3i s\u1eeda \u0111\u00fang nh\u00f3m nguy\u00ean nh\u00e2n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B\u00e0i n\u00e0y li\u1ec7t k\u00ea d\u1ea5u hi\u1ec7u, 8 nguy\u00ean nh\u00e2n hay g\u1eb7p v\u00e0 c\u00e1ch kh\u1eafc ph\u1ee5c workflow ch\u1eadm trong <a href=\"https:\/\/tino.vn\/blog\/n8n-la-gi\/\">n8n<\/a>. N\u1ebfu workflow kh\u00f4ng ch\u1ec9 ch\u1eadm m\u00e0 b\u1ecb d\u1eebng gi\u1eefa ch\u1eebng, xem th\u00eam <a href=\"https:\/\/tino.vn\/blog\/timeout-trong-n8n\/\">l\u1ed7i timeout trong n8n<\/a>; c\u00e1c l\u1ed7i API kh\u00e1c c\u00f3 \u1edf <a href=\"https:\/\/tino.vn\/blog\/loi-ket-noi-api-thuong-gap-trong-n8n\/\">b\u1ea3ng l\u1ed7i k\u1ebft n\u1ed1i API<\/a>. N\u1ed9i dung \u0111\u1ed1i chi\u1ebfu docs.n8n.io ng\u00e0y 22\/10\/2026.<\/p>\n\n\n\n<h2 id=\"D\u1ea5u_hi\u1ec7u_workflow_n8n_\u0111ang_ch\u1ea1y_ch\u1eadm\">D\u1ea5u hi\u1ec7u workflow n8n \u0111ang ch\u1ea1y ch\u1eadm<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Th\u1eddi gian ch\u1ea1y k\u00e9o d\u00e0i b\u1ea5t th\u01b0\u1eddng:<\/strong> workflow \u0111\u01a1n gi\u1ea3n v\u1ed1n m\u1ea5t v\u00e0i gi\u00e2y nay m\u1ea5t h\u00e0ng ch\u1ee5c gi\u00e2y ho\u1eb7c v\u00e0i ph\u00fat; so v\u1edbi l\u1ecbch s\u1eed Executions th\u1ea5y t\u0103ng g\u1ea5p nhi\u1ec1u l\u1ea7n.<\/li>\n\n\n<li><strong>M\u1ed9t node &#8220;treo&#8221; l\u00e2u:<\/strong> HTTP Request, Database, Code m\u1ea5t nhi\u1ec1u th\u1eddi gian m\u1edbi tr\u1ea3 k\u1ebft qu\u1ea3.<\/li>\n\n\n<li><strong>Executions t\u1ed3n \u0111\u1ecdng:<\/strong> nhi\u1ec1u l\u1ea7n ch\u1ea1y \u1edf tr\u1ea1ng th\u00e1i \u0111ang ch\u1ea1y ho\u1eb7c ch\u1edd, h\u00e0ng \u0111\u1ee3i (queue mode) d\u1ed3n l\u00ean.<\/li>\n\n\n<li><strong>T\u00e0i nguy\u00ean m\u00e1y ch\u1ee7 cao (b\u1ea3n t\u1ef1 host):<\/strong> CPU li\u00ean t\u1ee5c tr\u00ean 80\u201390%; RAM t\u0103ng v\u1ecdt kh\u00f4ng gi\u1ea3m sau khi workflow xong, c\u00f3 th\u1ec3 d\u1eabn t\u1edbi h\u1ebft b\u1ed9 nh\u1edb; \u1ed5 \u0111\u0129a \u0111\u1ecdc ghi li\u00ean t\u1ee5c, nh\u1ea5t l\u00e0 khi d\u00f9ng SQLite.<\/li>\n\n\n<li><strong>API b\u00ean ngo\u00e0i ch\u1eadm:<\/strong> node g\u1ecdi Google Sheets, Salesforce, OpenAI ph\u1ea3i ch\u1edd l\u00e2u.<\/li>\n\n\n<li><strong>Xu\u1ea5t hi\u1ec7n timeout ho\u1eb7c l\u1ea7n ch\u1ea1y b\u1ecb h\u1ee7y:<\/strong> d\u1ea5u hi\u1ec7u workflow \u0111\u00e3 v\u01b0\u1ee3t gi\u1edbi h\u1ea1n th\u1eddi gian.<\/li>\n\n\n<li><strong>Giao di\u1ec7n n8n \u00ec:<\/strong> m\u1edf workflow, s\u1eeda node, chuy\u1ec3n trang \u0111\u1ec1u ch\u1eadm khi workflow n\u1eb7ng \u0111ang ch\u1ea1y.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"L\u00e0m_sao_bi\u1ebft_workflow_ch\u1eadm_\u1edf_\u0111\u00e2u?\">L\u00e0m sao bi\u1ebft workflow ch\u1eadm \u1edf \u0111\u00e2u?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1edf m\u1ed9t l\u1ea7n ch\u1ea1y ch\u1eadm trong tab Executions v\u00e0 r\u00ea chu\u1ed9t l\u00ean t\u1eebng node: n8n hi\u1ec7n th\u1eddi gian node \u0111\u00f3 ch\u1ea1y trong l\u1ea7n th\u1ef1c thi. Node chi\u1ebfm ph\u1ea7n l\u1edbn th\u1eddi gian cho bi\u1ebft nh\u00f3m nguy\u00ean nh\u00e2n.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1400\" height=\"750\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/tai-sao-workflow-trong-n8n-chay-cham-chan-doan.webp\" alt=\"S\u01a1 \u0111\u1ed3 ch\u1ea9n \u0111o\u00e1n workflow n8n ch\u1ea1y ch\u1eadm: m\u1edf Executions v\u00e0 r\u00ea chu\u1ed9t l\u00ean t\u1eebng node \u0111\u1ec3 xem th\u1eddi gian; HTTP Request ho\u1eb7c API ch\u1eadm l\u00e0 do b\u00ean ngo\u00e0i, xem rate limit, ph\u00e2n trang, Timeout; node Code ho\u1eb7c nhi\u1ec1u item l\u00e0 do d\u1eef li\u1ec7u, d\u00f9ng Loop Over Items v\u00e0 Edit Fields; m\u1ecdi node \u0111\u1ec1u ch\u1eadm v\u00e0 giao di\u1ec7n \u00ec l\u00e0 do m\u00e1y ch\u1ee7, RAM, CPU, database ph\u00ecnh\" class=\"wp-image-131692\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/tai-sao-workflow-trong-n8n-chay-cham-chan-doan.webp 1400w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/tai-sao-workflow-trong-n8n-chay-cham-chan-doan-300x161.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/tai-sao-workflow-trong-n8n-chay-cham-chan-doan-1024x549.webp 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/tai-sao-workflow-trong-n8n-chay-cham-chan-doan-768x411.webp 768w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5: c\u00e1c node x\u1eed l\u00fd logic ch\u1ec9 m\u1ea5t v\u00e0i mili gi\u00e2y nh\u01b0ng node HTTP Request m\u1ea5t 30 gi\u00e2y th\u00ec g\u1ea7n nh\u01b0 ch\u1eafc ch\u1eafn API b\u00ean ngo\u00e0i l\u00e0 \u0111i\u1ec3m ngh\u1ebdn. C\u00e1ch \u0111\u1ecdc chi ti\u1ebft t\u1eebng l\u1ea7n ch\u1ea1y c\u00f3 \u1edf <a href=\"https:\/\/tino.vn\/blog\/cach-doc-va-hieu-execution-log-trong-n8n\/\">b\u00e0i execution log trong n8n<\/a>.<\/p>\n\n\n\n<h2 id=\"8_nguy\u00ean_nh\u00e2n_khi\u1ebfn_workflow_n8n_ch\u1ea1y_ch\u1eadm\">8 nguy\u00ean nh\u00e2n khi\u1ebfn workflow n8n ch\u1ea1y ch\u1eadm<\/h2>\n\n\n\n<h3 id=\"1._M\u00e1y_ch\u1ee7_thi\u1ebfu_CPU,_RAM\">1. M\u00e1y ch\u1ee7 thi\u1ebfu CPU, RAM<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">n8n ch\u1ea1y nhi\u1ec1u workflow c\u00f9ng l\u00fac t\u1ed1n CPU v\u00e0 RAM \u0111\u00e1ng k\u1ec3. M\u00e1y ch\u1ee7 c\u1ea5u h\u00ecnh th\u1ea5p ho\u1eb7c container Docker b\u1ecb gi\u1edbi h\u1ea1n t\u00e0i nguy\u00ean s\u1ebd nhanh ch\u1ea1m ng\u01b0\u1ee1ng.<\/p>\n\n\n\n<h3 id=\"2._X\u1eed_l\u00fd_qu\u00e1_nhi\u1ec1u_d\u1eef_li\u1ec7u_trong_m\u1ed9t_l\u1ea7n_ch\u1ea1y\">2. X\u1eed l\u00fd qu\u00e1 nhi\u1ec1u d\u1eef li\u1ec7u trong m\u1ed9t l\u1ea7n ch\u1ea1y<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1ed7i node chuy\u1ec3n to\u00e0n b\u1ed9 d\u1eef li\u1ec7u cho node sau. Node \u0111\u1ecdc Google Sheets hay HTTP Request tr\u1ea3 v\u1ec1 h\u00e0ng ch\u1ee5c ngh\u00ecn b\u1ea3n ghi th\u00ec t\u1ea5t c\u1ea3 n\u1eb1m trong b\u1ed9 nh\u1edb, c\u00e1c b\u01b0\u1edbc sau \u0111\u1ec1u n\u1eb7ng.<\/p>\n\n\n\n<h3 id=\"3._Node_Code_x\u1eed_l\u00fd_n\u1eb7ng\">3. Node Code x\u1eed l\u00fd n\u1eb7ng<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Node Code linh ho\u1ea1t nh\u01b0ng d\u1ec5 th\u00e0nh \u0111i\u1ec3m ngh\u1ebdn: v\u00f2ng l\u1eb7p l\u1ed3ng nhau, x\u1eed l\u00fd m\u1ea3ng l\u1edbn, g\u1ecdi API trong code.<\/p>\n\n\n\n<h3 id=\"4._Trigger_ki\u1ec3m_tra_qu\u00e1_d\u00e0y\">4. Trigger ki\u1ec3m tra qu\u00e1 d\u00e0y<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Schedule Trigger (t\u00ean c\u0169: Cron) ho\u1eb7c trigger polling ch\u1ea1y m\u1ed7i ph\u00fat cho vi\u1ec7c kh\u00f4ng c\u1ea7n t\u1ee9c th\u1eddi t\u1ea1o ra h\u00e0ng ngh\u00ecn l\u1ea7n ch\u1ea1y th\u1eeba m\u1ed7i ng\u00e0y.<\/p>\n\n\n\n<h3 id=\"5._V\u00f2ng_l\u1eb7p_g\u1ecdi_API_cho_t\u1eebng_item\">5. V\u00f2ng l\u1eb7p g\u1ecdi API cho t\u1eebng item<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">L\u1eb7p qua h\u00e0ng ngh\u00ecn item v\u00e0 m\u1ed7i v\u00f2ng g\u1ecdi m\u1ed9t API t\u1ea1o ra s\u1ed1 request kh\u1ed5ng l\u1ed3, v\u1eeba ch\u1eadm v\u1eeba d\u1ec5 b\u1ecb gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9.<\/p>\n\n\n\n<h3 id=\"6._API_b\u00ean_ngo\u00e0i_ho\u1eb7c_m\u1ea1ng_ch\u1eadm\">6. API b\u00ean ngo\u00e0i ho\u1eb7c m\u1ea1ng ch\u1eadm<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Workflow nhanh \u0111\u1ebfn \u0111\u00e2u c\u0169ng ph\u1ea3i ch\u1edd API (CRM, Google API) tr\u1ea3 l\u1eddi. M\u1ea1ng ch\u1eadp ch\u1eddn gi\u1eefa m\u00e1y ch\u1ee7 n8n v\u00e0 d\u1ecbch v\u1ee5 ngo\u00e0i, ho\u1eb7c t\u1edbi database PostgreSQL \u0111\u1eb7t \u1edf m\u00e1y kh\u00e1c, c\u0169ng th\u00eam \u0111\u1ed9 tr\u1ec5.<\/p>\n\n\n\n<h3 id=\"7._Database_ph\u00ecnh_v\u00ec_d\u1eef_li\u1ec7u_th\u1ef1c_thi\">7. Database ph\u00ecnh v\u00ec d\u1eef li\u1ec7u th\u1ef1c thi<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1eb7c \u0111\u1ecbnh n8n l\u01b0u d\u1eef li\u1ec7u c\u1ee7a c\u1ea3 l\u1ea7n ch\u1ea1y th\u00e0nh c\u00f4ng v\u00e0 l\u1ed7i, nh\u01b0ng t\u1ef1 x\u00f3a b\u1ea3n c\u0169 h\u01a1n 14 ng\u00e0y ho\u1eb7c khi v\u01b0\u1ee3t 10.000 b\u1ea3n (pruning b\u1eadt s\u1eb5n, <a href=\"https:\/\/docs.n8n.io\/deploy\/host-n8n\/configure-n8n\/basic-configuration\/use-environment-variables\/executions\/\" target=\"_blank\" rel=\"noopener nofollow\">docs: Executions environment variables<\/a>). Workflow x\u1eed l\u00fd file l\u1edbn ho\u1eb7c ch\u1ea1y r\u1ea5t d\u00e0y v\u1eabn c\u00f3 th\u1ec3 l\u00e0m database v\u00e0 th\u01b0 m\u1ee5c binary data ph\u00ecnh nhanh, khi\u1ebfn t\u1ea3i danh s\u00e1ch Executions, m\u1edf workflow \u0111\u1ec1u ch\u1eadm.<\/p>\n\n\n\n<h3 id=\"8._Phi\u00ean_b\u1ea3n_n8n_c\u0169\">8. Phi\u00ean b\u1ea3n n8n c\u0169<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C\u00e1c b\u1ea3n c\u1eadp nh\u1eadt th\u01b0\u1eddng c\u00f3 c\u1ea3i ti\u1ebfn b\u1ed9 nh\u1edb v\u00e0 t\u1ed1c \u0111\u1ed9. n8n 2.0 c\u0169ng \u0111\u1ed5i nhi\u1ec1u th\u1ee9 \u1edf t\u1ea7ng ch\u1ea1y (task runner cho node Code, driver SQLite m\u1edbi, b\u1ecf MySQL\/MariaDB l\u00e0m database). Xem <a href=\"https:\/\/tino.vn\/blog\/cach-cap-nhat-n8n\/\">c\u00e1ch c\u1eadp nh\u1eadt n8n<\/a> tr\u01b0\u1edbc khi n\u00e2ng c\u1ea5p.<\/p>\n\n\n\n<h2 id=\"C\u00e1ch_kh\u1eafc_ph\u1ee5c_workflow_n8n_ch\u1ea1y_ch\u1eadm\">C\u00e1ch kh\u1eafc ph\u1ee5c workflow n8n ch\u1ea1y ch\u1eadm<\/h2>\n\n\n\n<h3 id=\"Gi\u1ea3i_ph\u00e1p_1:_T\u1ed1i_\u01b0u_m\u00f4i_tr\u01b0\u1eddng_v\u00e0_c\u1ea5u_h\u00ecnh_(b\u1ea3n_t\u1ef1_host)\">Gi\u1ea3i ph\u00e1p 1: T\u1ed1i \u01b0u m\u00f4i tr\u01b0\u1eddng v\u00e0 c\u1ea5u h\u00ecnh (b\u1ea3n t\u1ef1 host)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1.1. D\u1ecdn d\u1eef li\u1ec7u th\u1ef1c thi \u0111\u00fang c\u00e1ch.<\/strong> \u0110\u1eb7t c\u00e1c bi\u1ebfn sau trong <code>docker-compose.yml<\/code> ho\u1eb7c file <code>.env<\/code>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Bi\u1ebfn<\/th><th>M\u1eb7c \u0111\u1ecbnh<\/th><th>\u00dd ngh\u0129a v\u00e0 g\u1ee3i \u00fd<\/th><\/tr><\/thead><tbody><tr><td><code>EXECUTIONS_DATA_PRUNE<\/code><\/td><td><code>true<\/code><\/td><td>T\u1ef1 x\u00f3a d\u1eef li\u1ec7u l\u1ea7n ch\u1ea1y c\u0169 theo chu k\u1ef3; gi\u1eef <code>true<\/code><\/td><\/tr><tr><td><code>EXECUTIONS_DATA_MAX_AGE<\/code><\/td><td><code>336<\/code><\/td><td>Tu\u1ed5i t\u1ed1i \u0111a t\u00ednh b\u1eb1ng <strong>gi\u1edd<\/strong> (336 gi\u1edd = 14 ng\u00e0y). Mu\u1ed1n gi\u1eef 30 ng\u00e0y, \u0111\u1eb7t <code>720<\/code>; \u0111\u1eb7t <code>30<\/code> ngh\u0129a l\u00e0 ch\u1ec9 gi\u1eef 30 gi\u1edd<\/td><\/tr><tr><td><code>EXECUTIONS_DATA_PRUNE_MAX_COUNT<\/code><\/td><td><code>10000<\/code><\/td><td>S\u1ed1 l\u1ea7n ch\u1ea1y t\u1ed1i \u0111a gi\u1eef l\u1ea1i; 0 = kh\u00f4ng gi\u1edbi h\u1ea1n<\/td><\/tr><tr><td><code>EXECUTIONS_DATA_SAVE_ON_SUCCESS<\/code><\/td><td><code>all<\/code><\/td><td>\u0110\u1eb7t <code>none<\/code> n\u1ebfu kh\u00f4ng c\u1ea7n xem l\u1ea1i l\u1ea7n ch\u1ea1y th\u00e0nh c\u00f4ng<\/td><\/tr><tr><td><code>EXECUTIONS_DATA_SAVE_ON_PROGRESS<\/code><\/td><td><code>false<\/code><\/td><td>Gi\u1eef <code>false<\/code>; b\u1eadt l\u00ean s\u1ebd ghi DB sau m\u1ed7i node<\/td><\/tr><tr><td><code>DB_SQLITE_VACUUM_ON_STARTUP<\/code><\/td><td><code>false<\/code><\/td><td>Ch\u1ec9 v\u1edbi SQLite: ch\u1ea1y VACUUM khi kh\u1edfi \u0111\u1ed9ng \u0111\u1ec3 thu nh\u1ecf file; t\u1ed1n th\u1eddi gian kh\u1edfi \u0111\u1ed9ng<\/td><\/tr><tr><td><code>GENERIC_TIMEZONE<\/code><\/td><td><code>America\/New_York<\/code><\/td><td>\u0110\u1eb7t <code>Asia\/Ho_Chi_Minh<\/code> \u0111\u1ec3 Schedule Trigger ch\u1ea1y \u0111\u00fang gi\u1edd Vi\u1ec7t Nam<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Bi\u1ebfn m\u00f4i tr\u01b0\u1eddng n\u00ean r\u00e0 khi n8n ch\u1eadm (theo <a href=\"https:\/\/docs.n8n.io\/deploy\/host-n8n\/configure-n8n\/basic-configuration\/use-environment-variables\/executions\/\" target=\"_blank\" rel=\"noopener nofollow\">Executions<\/a> v\u00e0 <a href=\"https:\/\/docs.n8n.io\/deploy\/host-n8n\/configure-n8n\/basic-configuration\/use-environment-variables\/database\/\" target=\"_blank\" rel=\"noopener nofollow\">Database<\/a> environment variables, 22\/10\/2026)<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>environment:\n  - EXECUTIONS_DATA_PRUNE=true\n  - EXECUTIONS_DATA_MAX_AGE=720        # 30 ng\u00e0y, t\u00ednh b\u1eb1ng gi\u1edd\n  - EXECUTIONS_DATA_PRUNE_MAX_COUNT=10000\n  - EXECUTIONS_DATA_SAVE_ON_SUCCESS=none\n  - GENERIC_TIMEZONE=Asia\/Ho_Chi_Minh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1.2. Chuy\u1ec3n t\u1eeb SQLite sang PostgreSQL khi t\u1ea3i l\u1edbn.<\/strong> SQLite l\u00e0 m\u1ed9t file, ghi \u0111\u1ed3ng th\u1eddi k\u00e9m khi nhi\u1ec1u workflow ch\u1ea1y c\u00f9ng l\u00fac; PostgreSQL ch\u1ecbu t\u1ea3i \u0111\u1ed3ng th\u1eddi t\u1ed1t h\u01a1n. T\u1eeb n8n 2.0, database ch\u00ednh ch\u1ec9 c\u00f2n SQLite ho\u1eb7c PostgreSQL; MySQL\/MariaDB kh\u00f4ng c\u00f2n \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3 (<a href=\"https:\/\/docs.n8n.io\/changelog\/v20-breaking-changes\/\" target=\"_blank\" rel=\"noopener nofollow\">v2.0 breaking changes<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>C\u1ea3nh b\u00e1o:<\/strong> ch\u1ec9 \u0111\u1ed5i <code>DB_TYPE=postgresdb<\/code> r\u1ed3i kh\u1edfi \u0111\u1ed9ng l\u1ea1i th\u00ec n8n t\u1ea1o m\u1ed9t database <strong>tr\u1ed1ng<\/strong>; workflow v\u00e0 credential c\u0169 kh\u00f4ng t\u1ef1 chuy\u1ec3n sang. L\u00e0m \u0111\u00fang th\u1ee9 t\u1ef1: sao l\u01b0u, export workflow v\u00e0 credential, gi\u1eef nguy\u00ean <code>N8N_ENCRYPTION_KEY<\/code>, \u0111\u1ed5i c\u1ea5u h\u00ecnh, r\u1ed3i import. H\u01b0\u1edbng d\u1eabn t\u1eebng b\u01b0\u1edbc: <a href=\"https:\/\/tino.vn\/blog\/doi-database-n8n-tu-sqlite-sang-postgresql\/\">\u0111\u1ed5i database n8n t\u1eeb SQLite sang PostgreSQL<\/a>; sao l\u01b0u tr\u01b0\u1edbc b\u1eb1ng <a href=\"https:\/\/tino.vn\/blog\/cach-backup-va-restore-workflow-n8n\/\">c\u00e1ch backup v\u00e0 restore workflow, credential n8n<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1.3. N\u00e2ng c\u1ea5p t\u00e0i nguy\u00ean.<\/strong> CPU ho\u1eb7c RAM th\u01b0\u1eddng xuy\u00ean ch\u1ea1m 90\u2013100% khi workflow ch\u1ea1y th\u00ec n\u00e2ng g\u00f3i VPS ho\u1eb7c t\u0103ng gi\u1edbi h\u1ea1n cho container. Tham kh\u1ea3o <a href=\"https:\/\/tino.vn\/blog\/cau-hinh-toi-thieu-de-trien-khai-vps-n8n\/\">c\u1ea5u h\u00ecnh t\u1ed1i thi\u1ec3u \u0111\u1ec3 ch\u1ea1y n8n tr\u00ean VPS<\/a> v\u00e0 <a href=\"https:\/\/tino.vn\/blog\/kinh-nghiem-toi-uu-hieu-suat-self-host-n8n\/\">kinh nghi\u1ec7m t\u1ed1i \u01b0u hi\u1ec7u su\u1ea5t self-host n8n<\/a>; chuy\u1ec3n sang m\u00e1y m\u1ea1nh h\u01a1n theo <a href=\"https:\/\/tino.vn\/blog\/cach-chuyen-n8n-sang-vps-moi\/\">c\u00e1ch chuy\u1ec3n n8n sang VPS m\u1edbi<\/a>.<\/p>\n\n\n\n<h3 id=\"Gi\u1ea3i_ph\u00e1p_2:_Thi\u1ebft_k\u1ebf_l\u1ea1i_workflow\">Gi\u1ea3i ph\u00e1p 2: Thi\u1ebft k\u1ebf l\u1ea1i workflow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2.1. Chia l\u00f4 b\u1eb1ng Loop Over Items.<\/strong> \u0110\u1eb7t node <a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/core-nodes\/n8n-nodes-base.splitinbatches\/\" target=\"_blank\" rel=\"noopener nofollow\">Loop Over Items<\/a> (t\u00ean c\u0169 Split in Batches) ngay sau node l\u1ea5y d\u1eef li\u1ec7u, Batch Size v\u00ed d\u1ee5 100. 10.000 \u0111\u01a1n h\u00e0ng th\u00e0nh 100 l\u00f4; m\u1ed7i v\u00f2ng ch\u1ec9 x\u1eed l\u00fd 100 item, \u00edt t\u1ed1n RAM, m\u1ed9t l\u00f4 l\u1ed7i kh\u00f4ng k\u00e9o c\u1ea3 qu\u00e1 tr\u00ecnh.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2.2. T\u00e1ch logic b\u1eb1ng sub-workflow.<\/strong> Workflow &#8220;\u0110\u01a1n h\u00e0ng m\u1edbi&#8221; \u0111ang l\u00e0m qu\u00e1 nhi\u1ec1u vi\u1ec7c (x\u00e1c th\u1ef1c, email, Google Sheets, Slack, kho) c\u00f3 th\u1ec3 t\u00e1ch th\u00e0nh workflow ch\u00ednh &#8220;[Main] New Order&#8221; v\u00e0 c\u00e1c workflow con &#8220;[Sub] Send Confirmation Email&#8221;, &#8220;[Sub] Update Google Sheet&#8221;&#8230; g\u1ecdi b\u1eb1ng node Execute Sub-workflow. Xem <a href=\"https:\/\/tino.vn\/blog\/cach-tao-sub-workflow-tren-n8n\/\">c\u00e1ch t\u1ea1o sub-workflow<\/a>.<\/p>\n\n\n\n<h3 id=\"Gi\u1ea3i_ph\u00e1p_3:_X\u1eed_l\u00fd_d\u1eef_li\u1ec7u_l\u1edbn\">Gi\u1ea3i ph\u00e1p 3: X\u1eed l\u00fd d\u1eef li\u1ec7u l\u1edbn<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3.1. L\u1ea5y d\u1eef li\u1ec7u theo trang.<\/strong> \u0110\u1eebng g\u1ecdi m\u1ed9t l\u1ea7n l\u1ea5y 50.000 b\u1ea3n ghi. Node HTTP Request c\u00f3 t\u00f9y ch\u1ecdn Pagination: \u0111\u1eb7t tham s\u1ed1 trang (page, limit, offset ho\u1eb7c cursor) theo t\u00e0i li\u1ec7u API, v\u00ed d\u1ee5 limit 200 v\u00e0 t\u0103ng page t\u1edbi khi API tr\u1ea3 m\u1ea3ng r\u1ed7ng.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3.2. B\u1ecf tr\u01b0\u1eddng th\u1eeba s\u1edbm.<\/strong> Node tr\u1ea3 50 tr\u01b0\u1eddng nh\u01b0ng b\u1ea1n ch\u1ec9 c\u1ea7n name, email, order_id: th\u00eam node Edit Fields ngay sau, ch\u1ec9 gi\u1eef c\u00e1c tr\u01b0\u1eddng c\u1ea7n, t\u1eaft Include Other Input Fields.<\/p>\n\n\n\n<h3 id=\"Gi\u1ea3i_ph\u00e1p_4:_T\u1ed1i_\u01b0u_trigger_v\u00e0_node\">Gi\u1ea3i ph\u00e1p 4: T\u1ed1i \u01b0u trigger v\u00e0 node<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4.1. \u01afu ti\u00ean webhook thay v\u00ec polling.<\/strong> Schedule Trigger ch\u1ea1y m\u1ed7i ph\u00fat l\u00e0 1.440 l\u1ea7n m\u1ed7i ng\u00e0y d\u00f9 kh\u00f4ng c\u00f3 \u0111\u01a1n m\u1edbi. N\u1ebfu n\u1ec1n t\u1ea3ng (Shopify, WooCommerce, Typeform&#8230;) h\u1ed7 tr\u1ee3 webhook, cho n\u00f3 g\u1ecdi <a href=\"https:\/\/tino.vn\/blog\/node-webhook-trong-n8n\/\">node Webhook<\/a> ch\u1ec9 khi c\u00f3 s\u1ef1 ki\u1ec7n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4.2. Vi\u1ebft code g\u1ecdn trong node Code.<\/strong> \u01afu ti\u00ean node c\u00f3 s\u1eb5n; gi\u1eef node Code cho bi\u1ebfn \u0111\u1ed5i d\u1eef li\u1ec7u \u0111\u01a1n gi\u1ea3n; \u0111\u01b0a l\u1eddi g\u1ecdi API ra node HTTP Request ri\u00eang.<\/p>\n\n\n\n<h3 id=\"Gi\u1ea3i_ph\u00e1p_5:_C\u1eadp_nh\u1eadt_n8n\">Gi\u1ea3i ph\u00e1p 5: C\u1eadp nh\u1eadt n8n<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C\u1eadp nh\u1eadt l\u00ean b\u1ea3n \u1ed5n \u0111\u1ecbnh m\u1edbi \u0111\u1ec3 nh\u1eadn c\u1ea3i ti\u1ebfn hi\u1ec7u su\u1ea5t, sau khi \u0111\u1ecdc ghi ch\u00fa ph\u00e1t h\u00e0nh v\u00e0 sao l\u01b0u. H\u01b0\u1edbng d\u1eabn: <a href=\"https:\/\/tino.vn\/blog\/cach-cap-nhat-n8n\/\">c\u00e1ch c\u1eadp nh\u1eadt n8n l\u00ean phi\u00ean b\u1ea3n m\u1edbi<\/a>.<\/p>\n\n\n\n<h3 id=\"Gi\u1ea3i_ph\u00e1p_6:_Queue_mode_cho_t\u1ea3i_l\u1edbn_(n\u00e2ng_cao)\">Gi\u1ea3i ph\u00e1p 6: Queue mode cho t\u1ea3i l\u1edbn (n\u00e2ng cao)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">V\u1edbi h\u1ec7 th\u1ed1ng nhi\u1ec1u workflow ch\u1ea1y \u0111\u1ed3ng th\u1eddi, b\u1eadt <code>EXECUTIONS_MODE=queue<\/code> k\u00e8m Redis: ti\u1ebfn tr\u00ecnh ch\u00ednh nh\u1eadn vi\u1ec7c v\u00e0 \u0111\u01b0a v\u00e0o h\u00e0ng \u0111\u1ee3i, c\u00e1c worker x\u1eed l\u00fd. Giao di\u1ec7n kh\u00f4ng b\u1ecb k\u00e9o ch\u1eadm b\u1edfi workflow n\u1eb7ng v\u00e0 c\u00f3 th\u1ec3 th\u00eam worker khi t\u1ea3i t\u0103ng. Queue mode c\u1ea7n PostgreSQL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mu\u1ed1n ch\u1ea1y n8n 24\/7 m\u00e0 kh\u00f4ng t\u1ef1 c\u00e0i? <a href=\"https:\/\/tino.vn\/vps-n8n\">VPS n8n c\u1ee7a Tino<\/a> c\u00e0i s\u1eb5n n8n tr\u00ean VPS NVMe \u0111\u1eb7t t\u1ea1i Vi\u1ec7t Nam; b\u1ea1n v\u1eabn c\u00f3 quy\u1ec1n root \u0111\u1ec3 c\u1ea5u h\u00ecnh. Xem c\u1ea5u h\u00ecnh v\u00e0 gi\u00e1 tr\u00ean trang s\u1ea3n ph\u1ea9m.<\/p>\n\n\n\n<h2 id=\"K\u1ebft_lu\u1eadn\">K\u1ebft lu\u1eadn<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Workflow ch\u1eadm hi\u1ebfm khi do m\u1ed9t l\u00fd do duy nh\u1ea5t. \u0110o tr\u01b0\u1edbc \u1edf Executions, x\u00e1c \u0111\u1ecbnh node t\u1ed1n th\u1eddi gian, r\u1ed3i x\u1eed l\u00fd theo nh\u00f3m: API th\u00ec ph\u00e2n trang v\u00e0 gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9, d\u1eef li\u1ec7u th\u00ec chia l\u00f4 v\u00e0 b\u1ecf tr\u01b0\u1eddng th\u1eeba, m\u00e1y ch\u1ee7 th\u00ec d\u1ecdn d\u1eef li\u1ec7u th\u1ef1c thi \u0111\u00fang \u0111\u01a1n v\u1ecb gi\u1edd, n\u00e2ng t\u00e0i nguy\u00ean, chuy\u1ec3n PostgreSQL theo \u0111\u00fang quy tr\u00ecnh.<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_c\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p\">Nh\u1eefng c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"T\u1ea1i_sao_node_HTTP_Request_th\u01b0\u1eddng_ch\u1eadm?\">T\u1ea1i sao node HTTP Request th\u01b0\u1eddng ch\u1eadm?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Node n\u00e0y ph\u1ee5 thu\u1ed9c t\u1ed1c \u0111\u1ed9 ph\u1ea3n h\u1ed3i c\u1ee7a API b\u00ean ngo\u00e0i, gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9 (rate limit) v\u00e0 ch\u1ea5t l\u01b0\u1ee3ng m\u1ea1ng. \u0110\u1eb7t Timeout, b\u1eadt Retry On Fail v\u00e0 l\u1ea5y d\u1eef li\u1ec7u theo trang \u0111\u1ec3 gi\u1ea3m th\u1eddi gian ch\u1edd.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"\u0110\u00e3_t\u1ed1i_\u01b0u_m\u00e0_workflow_v\u1eabn_ch\u1eadm_th\u00ec_l\u00e0m_g\u00ec_ti\u1ebfp?\">\u0110\u00e3 t\u1ed1i \u01b0u m\u00e0 workflow v\u1eabn ch\u1eadm th\u00ec l\u00e0m g\u00ec ti\u1ebfp?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Xem log c\u1ee7a n8n (docker logs v\u1edbi b\u1ea3n Docker) \u0111\u1ec3 t\u00ecm c\u1ea3nh b\u00e1o b\u1ed9 nh\u1edb; t\u1ea1m v\u00f4 hi\u1ec7u h\u00f3a t\u1eebng node (Deactivate) \u0111\u1ec3 khoanh v\u00f9ng; theo d\u00f5i t\u00e0i nguy\u00ean m\u00e1y ch\u1ee7 khi workflow ch\u1ea1y; h\u1ecfi th\u00eam tr\u00ean di\u1ec5n \u0111\u00e0n c\u1ed9ng \u0111\u1ed3ng n8n k\u00e8m \u1ea3nh Executions.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Theo_d\u00f5i_t\u00e0i_nguy\u00ean_n8n_\u0111ang_d\u00f9ng_b\u1eb1ng_c\u00e1ch_n\u00e0o?\">Theo d\u00f5i t\u00e0i nguy\u00ean n8n \u0111ang d\u00f9ng b\u1eb1ng c\u00e1ch n\u00e0o?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Tr\u00ean Linux d\u00f9ng htop cho CPU, RAM; n\u1ebfu ch\u1ea1y Docker d\u00f9ng docker stats \u0111\u1ec3 xem t\u1eebng container theo th\u1eddi gian th\u1ef1c.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"X\u00f3a_d\u1eef_li\u1ec7u_th\u1ef1c_thi_c\u0169_c\u00f3_l\u00e0m_n8n_nhanh_h\u01a1n_kh\u00f4ng?\">X\u00f3a d\u1eef li\u1ec7u th\u1ef1c thi c\u0169 c\u00f3 l\u00e0m n8n nhanh h\u01a1n kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">C\u00f3, khi database \u0111\u00e3 l\u1edbn: b\u1ea3ng executions nh\u1ecf l\u1ea1i th\u00ec t\u1ea3i danh s\u00e1ch Executions, m\u1edf workflow nhanh h\u01a1n. Pruning b\u1eadt s\u1eb5n; ch\u1ec9 c\u1ea7n ki\u1ec3m tra EXECUTIONS_DATA_MAX_AGE (\u0111\u01a1n v\u1ecb gi\u1edd) v\u00e0 EXECUTIONS_DATA_PRUNE_MAX_COUNT ph\u00f9 h\u1ee3p. V\u1edbi SQLite, file ch\u1ec9 thu nh\u1ecf sau khi VACUUM.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"L\u00e0m_sao_bi\u1ebft_ch\u1eadm_do_workflow_c\u1ee7a_t\u00f4i_hay_do_API_b\u00ean_th\u1ee9_ba?\">L\u00e0m sao bi\u1ebft ch\u1eadm do workflow c\u1ee7a t\u00f4i hay do API b\u00ean th\u1ee9 ba?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Trong chi ti\u1ebft m\u1ed9t l\u1ea7n ch\u1ea1y, r\u00ea chu\u1ed9t qua t\u1eebng node \u0111\u1ec3 xem th\u1eddi gian. Node logic ch\u1ea1y v\u00e0i mili gi\u00e2y c\u00f2n HTTP Request m\u1ea5t h\u00e0ng ch\u1ee5c gi\u00e2y th\u00ec nguy\u00ean nh\u00e2n g\u1ea7n nh\u01b0 ch\u1eafc ch\u1eafn \u1edf API b\u00ean ngo\u00e0i.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Workflow_ch\u1ec9_ch\u1eadm_v\u00e0o_m\u1ed9t_s\u1ed1_gi\u1edd_trong_ng\u00e0y,_v\u00ec_sao?\">Workflow ch\u1ec9 ch\u1eadm v\u00e0o m\u1ed9t s\u1ed1 gi\u1edd trong ng\u00e0y, v\u00ec sao?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Th\u01b0\u1eddng do API b\u1ea1n g\u1ecdi \u0111ang gi\u1edd cao \u0111i\u1ec3m n\u00ean tr\u1ea3 l\u1eddi ch\u1eadm, ho\u1eb7c nhi\u1ec1u Schedule Trigger c\u00f9ng \u0111\u1eb7t ch\u1ea1y m\u1ed9t gi\u1edd (v\u00ed d\u1ee5 \u0111\u00fang 8:00) tranh t\u00e0i nguy\u00ean m\u00e1y ch\u1ee7. R\u1ea3i l\u1ecbch ch\u1ea1y l\u1ec7ch nhau v\u00e0i ph\u00fat.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"C\u00f3_n\u00ean_chuy\u1ec3n_SQLite_sang_PostgreSQL_kh\u00f4ng?\">C\u00f3 n\u00ean chuy\u1ec3n SQLite sang PostgreSQL kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">N\u00ean, khi nhi\u1ec1u workflow ch\u1ea1y \u0111\u1ed3ng th\u1eddi ho\u1eb7c \u0111\u1ecbnh d\u00f9ng queue mode. SQLite l\u00e0 m\u1ed9t file n\u00ean ghi \u0111\u1ed3ng th\u1eddi ph\u1ea3i x\u1ebfp h\u00e0ng; PostgreSQL x\u1eed l\u00fd nhi\u1ec1u k\u1ebft n\u1ed1i c\u00f9ng l\u00fac t\u1ed1t h\u01a1n. Nh\u1edb chuy\u1ec3n d\u1eef li\u1ec7u theo \u0111\u00fang quy tr\u00ecnh export, import v\u00e0 gi\u1eef N8N_ENCRYPTION_KEY.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"T\u1ea1i sao node HTTP Request th\u01b0\u1eddng ch\u1eadm?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Node n\u00e0y ph\u1ee5 thu\u1ed9c t\u1ed1c \u0111\u1ed9 ph\u1ea3n h\u1ed3i c\u1ee7a API b\u00ean ngo\u00e0i, gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9 (rate limit) v\u00e0 ch\u1ea5t l\u01b0\u1ee3ng m\u1ea1ng. \u0110\u1eb7t Timeout, b\u1eadt Retry On Fail v\u00e0 l\u1ea5y d\u1eef li\u1ec7u theo trang \u0111\u1ec3 gi\u1ea3m th\u1eddi gian ch\u1edd.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"\u0110\u00e3 t\u1ed1i \u01b0u m\u00e0 workflow v\u1eabn ch\u1eadm th\u00ec l\u00e0m g\u00ec ti\u1ebfp?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Xem log c\u1ee7a n8n (docker logs v\u1edbi b\u1ea3n Docker) \u0111\u1ec3 t\u00ecm c\u1ea3nh b\u00e1o b\u1ed9 nh\u1edb; t\u1ea1m v\u00f4 hi\u1ec7u h\u00f3a t\u1eebng node (Deactivate) \u0111\u1ec3 khoanh v\u00f9ng; theo d\u00f5i t\u00e0i nguy\u00ean m\u00e1y ch\u1ee7 khi workflow ch\u1ea1y; h\u1ecfi th\u00eam tr\u00ean di\u1ec5n \u0111\u00e0n c\u1ed9ng \u0111\u1ed3ng n8n k\u00e8m \u1ea3nh Executions.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Theo d\u00f5i t\u00e0i nguy\u00ean n8n \u0111ang d\u00f9ng b\u1eb1ng c\u00e1ch n\u00e0o?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Tr\u00ean Linux d\u00f9ng htop cho CPU, RAM; n\u1ebfu ch\u1ea1y Docker d\u00f9ng docker stats \u0111\u1ec3 xem t\u1eebng container theo th\u1eddi gian th\u1ef1c.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"X\u00f3a d\u1eef li\u1ec7u th\u1ef1c thi c\u0169 c\u00f3 l\u00e0m n8n nhanh h\u01a1n kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3, khi database \u0111\u00e3 l\u1edbn: b\u1ea3ng executions nh\u1ecf l\u1ea1i th\u00ec t\u1ea3i danh s\u00e1ch Executions, m\u1edf workflow nhanh h\u01a1n. Pruning b\u1eadt s\u1eb5n; ch\u1ec9 c\u1ea7n ki\u1ec3m tra EXECUTIONS_DATA_MAX_AGE (\u0111\u01a1n v\u1ecb gi\u1edd) v\u00e0 EXECUTIONS_DATA_PRUNE_MAX_COUNT ph\u00f9 h\u1ee3p. V\u1edbi SQLite, file ch\u1ec9 thu nh\u1ecf sau khi VACUUM.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"L\u00e0m sao bi\u1ebft ch\u1eadm do workflow c\u1ee7a t\u00f4i hay do API b\u00ean th\u1ee9 ba?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Trong chi ti\u1ebft m\u1ed9t l\u1ea7n ch\u1ea1y, r\u00ea chu\u1ed9t qua t\u1eebng node \u0111\u1ec3 xem th\u1eddi gian. Node logic ch\u1ea1y v\u00e0i mili gi\u00e2y c\u00f2n HTTP Request m\u1ea5t h\u00e0ng ch\u1ee5c gi\u00e2y th\u00ec nguy\u00ean nh\u00e2n g\u1ea7n nh\u01b0 ch\u1eafc ch\u1eafn \u1edf API b\u00ean ngo\u00e0i.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Workflow ch\u1ec9 ch\u1eadm v\u00e0o m\u1ed9t s\u1ed1 gi\u1edd trong ng\u00e0y, v\u00ec sao?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Th\u01b0\u1eddng do API b\u1ea1n g\u1ecdi \u0111ang gi\u1edd cao \u0111i\u1ec3m n\u00ean tr\u1ea3 l\u1eddi ch\u1eadm, ho\u1eb7c nhi\u1ec1u Schedule Trigger c\u00f9ng \u0111\u1eb7t ch\u1ea1y m\u1ed9t gi\u1edd (v\u00ed d\u1ee5 \u0111\u00fang 8:00) tranh t\u00e0i nguy\u00ean m\u00e1y ch\u1ee7. R\u1ea3i l\u1ecbch ch\u1ea1y l\u1ec7ch nhau v\u00e0i ph\u00fat.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"C\u00f3 n\u00ean chuy\u1ec3n SQLite sang PostgreSQL kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>N\u00ean, khi nhi\u1ec1u workflow ch\u1ea1y \u0111\u1ed3ng th\u1eddi ho\u1eb7c \u0111\u1ecbnh d\u00f9ng queue mode. SQLite l\u00e0 m\u1ed9t file n\u00ean ghi \u0111\u1ed3ng th\u1eddi ph\u1ea3i x\u1ebfp h\u00e0ng; PostgreSQL x\u1eed l\u00fd nhi\u1ec1u k\u1ebft n\u1ed1i c\u00f9ng l\u00fac t\u1ed1t h\u01a1n. Nh\u1edb chuy\u1ec3n d\u1eef li\u1ec7u theo \u0111\u00fang quy tr\u00ecnh export, import v\u00e0 gi\u1eef N8N_ENCRYPTION_KEY.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Workflow n8n ch\u1ea1y ch\u1eadm th\u01b0\u1eddng do m\u1ed9t trong b\u1ed1n nh\u00f3m: m\u00e1y ch\u1ee7 thi\u1ebfu RAM ho\u1eb7c CPU, workflow x\u1eed l\u00fd qu\u00e1 nhi\u1ec1u item trong m\u1ed9t l\u1ea7n, c\u01a1 s\u1edf d\u1eef li\u1ec7u ph\u00ecnh v\u00ec d\u1eef li\u1ec7u th\u1ef1c thi, v\u00e0 API b\u00ean ngo\u00e0i ph\u1ea3n h\u1ed3i ch\u1eadm. Xem tab Executions \u0111\u1ec3 bi\u1ebft node n\u00e0o t\u1ed1n th\u1eddi gian nh\u1ea5t, r\u1ed3i s\u1eeda [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":118905,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7397],"tags":[7343],"class_list":["post-118892","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n8n","tag-n8n"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/118892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=118892"}],"version-history":[{"count":5,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/118892\/revisions"}],"predecessor-version":[{"id":131713,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/118892\/revisions\/131713"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/118905"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=118892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=118892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=118892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}