Hướng dẫn sửa lỗi 503 service unavailable trên Magento 2

503 service temporarily unavailable là 1 lỗi khá phổ biến trong Magento, nếu chẳng may bạn gặp lỗi này và bạn không biết phải làm sao. Trong bài viết này mình sẽ hướng dẫn các bạn cách sửa lỗi 503 service unavailable.

503 Service Temporarily Unavailable là gì?

lỗi 503 service temporarily unavailable

Lỗi này là do máy chủ không thể xử lý yêu cầu vì bị quá tải hoặc ngừng hoạt động để bảo trì. Nói chung, đây là một trạng thái tạm thời

Tại sao nó lại xảy ra?

Trong quá trình cài đặt Magento, nó tạo ra một tập tin maintenance.flag. Nếu tệp vẫn tồn tại, hệ thống sẽ hiển thị lỗi 503, nó sẽ tự động xóa tập tin đó sau khi xử lý. Nhưng đôi khi, nó lại không bị xóa.

Cách Fix lỗi.

B1 : Vào thư mục gốc của Magento và xóa var/.maintenance.flag

B2 : Làm mới cache bằng lệnh : php bin/magento cache:flush

Nếu bị lỗi “Exception printing is disabled by default for security reasons” hoặc “Please Upgrade your database”

Thì bạn chạy lệnh : php bin/magento setup:upgrade

Lưu ý: Nếu là Magento 1 thì các bạn xóa file maintenance.flag ra khỏi thư mục Magento gốc , còn với Magento 2 các bạn xóa file .maintenance.flag trong “[thư-mục-gốc-magento]/var”

Cảm ơn các bạn đã đọc bài viết.

0 0 votes
Article Rating

Callula Huy

Callula is the Marketing Executive at Magetop. With more than 5 years of copywriting under her belt, Callula is into creating valuable content that is straight to the point. Life student. Workaholic. Foreign languages and traveling aficionado.

Leave a Reply or put your Question here

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x