Docker容器启动后的某个时间出现错误503

时间:2020-08-19 14:26:41

标签: apache docker docker-compose

我有一个docker compose文件,该文件创建了节点js,php容器和一个MySql DB。一切正常,容器已装好。但是,当我尝试检查网站状态时,一会儿出现错误503。网站在大约5分钟后启动。我在Docker日志中没有看到任何错误。附加了docker stats命令输出。内存分配看起来不错。 enter image description here

应用docker日志,您看到那里有4分钟的时间。

    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.*.*.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.*.*.2. Set the 'ServerName' directive globally to suppress this message
[Wed Aug 19 13:22:09.190559 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.18 configured -- resuming normal operations
[Wed Aug 19 13:22:09.190694 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
172.*.*.* - - [19/Aug/2020:13:26:53 -0400] "GET / HTTP/1.1" 200 2327 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
172.*.*.* - - [19/Aug/2020:13:26:54 -0400] "GET /static/js/main.0c1fa848.chunk.js HTTP/1.1" 200 9534 "https://example.ai/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.39.149 Safari/537.36"

1 个答案:

答案 0 :(得分:0)

Docker日志不能保证网站正常运行,它可以检查服务状态,但是网站可能需要一些时间才能启动。尝试找出手动启动所有服务后需要花费多少时间。

相关问题