Comments (4)
mysql> select count(*) from diagnosis_logs;
+----------+
| count(*) |
+----------+
| 2067941 |
+----------+
1 row in set (0.31 sec)
mysql> SELECT count(*) FROM `diagnosis_logs` WHERE `diagnosis_logs`.`occurred_at` > '2021-03-09 09:57:26' ORDER BY `diagnosis_logs`.`occurred_at` DESC;
+----------+
| count(*) |
+----------+
| 2062075 |
+----------+
1 row in set (0.51 sec)
mysql> explain SELECT count(*) FROM `diagnosis_logs` WHERE `diagnosis_logs`.`occurred_at` > '2021-03-09 09:57:26' ORDER BY `diagnosis_logs`.`occurred_at` DESC;
+----+-------------+----------------+------------+-------+-------------------------------------+-------------------------------------+---------+------+--------+----------+--------------------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+----------------+------------+-------+-------------------------------------+-------------------------------------+---------+------+--------+----------+--------------------------+
| 1 | SIMPLE | diagnosis_logs | NULL | range | index_diagnosis_logs_on_occurred_at | index_diagnosis_logs_on_occurred_at | 6 | NULL | 917141 | 100.00 | Using where; Using index |
+----+-------------+----------------+------------+-------+-------------------------------------+-------------------------------------+---------+------+--------+----------+--------------------------+
1 row in set, 1 warning (0.00 sec)
mysql> explain SELECT count(*) FROM `diagnosis_logs` WHERE `occurred_at` > '2021-03-09 09:57:26';
+----+-------------+----------------+------------+-------+-------------------------------------+-------------------------------------+---------+------+--------+----------+--------------------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+----------------+------------+-------+-------------------------------------+-------------------------------------+---------+------+--------+----------+--------------------------+
| 1 | SIMPLE | diagnosis_logs | NULL | range | index_diagnosis_logs_on_occurred_at | index_diagnosis_logs_on_occurred_at | 6 | NULL | 917141 | 100.00 | Using where; Using index |
+----+-------------+----------------+------------+-------+-------------------------------------+-------------------------------------+---------+------+--------+----------+--------------------------+
1 row in set, 1 warning (0.00 sec)
mysql> explain SELECT count(*) FROM `diagnosis_logs`;
+----+-------------+----------------+------------+-------+---------------+--------------------------------+---------+------+---------+----------+-------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+----------------+------------+-------+---------------+--------------------------------+---------+------+---------+----------+-------------+
| 1 | SIMPLE | diagnosis_logs | NULL | index | NULL | index_diagnosis_logs_on_result | 5 | NULL | 1834282 | 100.00 | Using index |
+----+-------------+----------------+------------+-------+---------------+--------------------------------+---------+------+---------+----------+-------------+
1 row in set, 1 warning (0.00 sec)
mysql> show index from diagnosis_logs;
+----------------+------------+-------------------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+----------------+------------+-------------------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| diagnosis_logs | 0 | PRIMARY | 1 | id | A | 1834282 | NULL | NULL | | BTREE | | |
| diagnosis_logs | 1 | index_diagnosis_logs_on_result | 1 | result | A | 2 | NULL | NULL | YES | BTREE | | |
| diagnosis_logs | 1 | index_diagnosis_logs_on_log_campaign_uuid | 1 | log_campaign_uuid | A | 14766 | NULL | NULL | YES | BTREE | | |
| diagnosis_logs | 1 | index_diagnosis_logs_on_occurred_at | 1 | occurred_at | A | 131767 | NULL | NULL | YES | BTREE | | |
+----------------+------------+-------------------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
4 rows in set (0.00 sec)
from sindan-docker.
sindan-old.sindan-net.com
- (2017.4ms) SELECT `diagnosis_logs`.`occurred_at` FROM `diagnosis_logs` WHERE `diagnosis_logs`.`occurred_at` > '2021-03-09 13:45:00' ORDER BY `diagnosis_logs`.`occurred_at` DESC
- ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.024 seconds); all pooled connections were in use):
visualization_1 | => Booting WEBrick
visualization_1 | => Rails 5.2.4.5 application starting in production on http://0.0.0.0:3000
visualization_1 | => Run `rails server -h` for more startup options
visualization_1 | Creating scope :fail. Overwriting existing method DiagnosisLog.fail.
visualization_1 | [2021-03-19 22:44:35] INFO WEBrick 1.4.2
visualization_1 | [2021-03-19 22:44:35] INFO ruby 2.6.3 (2019-04-16) [x86_64-linux-musl]
visualization_1 | [2021-03-19 22:44:35] INFO WEBrick::HTTPServer#start: pid=1 port=3000
visualization_1 | [058f6cfa-6f9c-4af0-bf94-30730c8d26ee] Started GET "/" for 127.0.0.1 at 2021-03-19 22:44:38 +0900
visualization_1 | [058f6cfa-6f9c-4af0-bf94-30730c8d26ee] Processing by LogCampaignsController#index as HTML
visualization_1 | [058f6cfa-6f9c-4af0-bf94-30730c8d26ee] (0.7ms) SET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
visualization_1 | [058f6cfa-6f9c-4af0-bf94-30730c8d26ee] (1710.5ms) SELECT `diagnosis_logs`.`occurred_at` FROM `diagnosis_logs` WHERE `diagnosis_logs`.`occurred_at` > '2021-03-09 13:44:38' ORDER BY `diagnosis_logs`.`occurred_at` DESC
visualization_1 | [b01bb74e-69a1-46fd-90b7-117244dd2dcd] Started GET "/" for 127.0.0.1 at 2021-03-19 22:44:45 +0900
visualization_1 | [b01bb74e-69a1-46fd-90b7-117244dd2dcd] Processing by LogCampaignsController#index as HTML
visualization_1 | [b01bb74e-69a1-46fd-90b7-117244dd2dcd] (0.5ms) SET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
visualization_1 | [b01bb74e-69a1-46fd-90b7-117244dd2dcd] (1845.3ms) SELECT `diagnosis_logs`.`occurred_at` FROM `diagnosis_logs` WHERE `diagnosis_logs`.`occurred_at` > '2021-03-09 13:44:45' ORDER BY `diagnosis_logs`.`occurred_at` DESC
visualization_1 | [48a85673-e695-46b1-b021-50f66a5f66fc] Started GET "/" for 127.0.0.1 at 2021-03-19 22:44:52 +0900
visualization_1 | [48a85673-e695-46b1-b021-50f66a5f66fc] Processing by LogCampaignsController#index as HTML
visualization_1 | [48a85673-e695-46b1-b021-50f66a5f66fc] (200.1ms) SET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
visualization_1 | [48a85673-e695-46b1-b021-50f66a5f66fc] (2011.2ms) SELECT `diagnosis_logs`.`occurred_at` FROM `diagnosis_logs` WHERE `diagnosis_logs`.`occurred_at` > '2021-03-09 13:44:52' ORDER BY `diagnosis_logs`.`occurred_at` DESC
visualization_1 | [ca66e62e-72e4-47f1-b9e0-c06c44d649b4] Started GET "/" for 127.0.0.1 at 2021-03-19 22:44:59 +0900
visualization_1 | [ca66e62e-72e4-47f1-b9e0-c06c44d649b4] Processing by LogCampaignsController#index as HTML
visualization_1 | [ca66e62e-72e4-47f1-b9e0-c06c44d649b4] (100.3ms) SET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
visualization_1 | [ca66e62e-72e4-47f1-b9e0-c06c44d649b4] (2017.4ms) SELECT `diagnosis_logs`.`occurred_at` FROM `diagnosis_logs` WHERE `diagnosis_logs`.`occurred_at` > '2021-03-09 13:45:00' ORDER BY `diagnosis_logs`.`occurred_at` DESC
visualization_1 | [d94319fc-acd9-46ec-aced-05e1efa87669] Started GET "/" for 127.0.0.1 at 2021-03-19 22:45:06 +0900
visualization_1 | [d94319fc-acd9-46ec-aced-05e1efa87669] Processing by LogCampaignsController#index as HTML
visualization_1 | [d94319fc-acd9-46ec-aced-05e1efa87669] (0.5ms) SET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
visualization_1 | [d94319fc-acd9-46ec-aced-05e1efa87669] (1793.2ms) SELECT `diagnosis_logs`.`occurred_at` FROM `diagnosis_logs` WHERE `diagnosis_logs`.`occurred_at` > '2021-03-09 13:45:06' ORDER BY `diagnosis_logs`.`occurred_at` DESC
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4] Started GET "/" for 172.19.0.1 at 2021-03-19 22:45:09 +0900
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4] Processing by LogCampaignsController#index as */*
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4] Completed 500 Internal Server Error in 5026ms (ActiveRecord: 0.0ms)
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4]
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4] ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.024 seconds); all pooled connections were in use):
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4]
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4] app/models/diagnosis_log.rb:79:in `block in date_list'
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4] app/models/diagnosis_log.rb:78:in `date_list'
visualization_1 | [d3d4054b-f294-4e70-b13f-298a53a112b4] app/controllers/application_controller.rb:9:in `set_variables'
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9] Started GET "/" for 127.0.0.1 at 2021-03-19 22:45:14 +0900
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9] Processing by LogCampaignsController#index as HTML
visualization_1 | 172.19.0.1 - - [19/Mar/2021:22:45:09 JST] "GET / HTTP/1.1" 500 1477
visualization_1 | - -> /
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9] Completed 500 Internal Server Error in 5011ms (ActiveRecord: 0.0ms)
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9]
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9] ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.009 seconds); all pooled connections were in use):
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9]
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9] app/models/diagnosis_log.rb:79:in `block in date_list'
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9] app/models/diagnosis_log.rb:78:in `date_list'
visualization_1 | [c09086a4-f2bc-407d-80b0-a2f501f9a4a9] app/controllers/application_controller.rb:9:in `set_variables'
visualization_1 | 127.0.0.1 - - [19/Mar/2021:22:45:14 JST] "GET / HTTP/1.1" 500 1477
visualization_1 | - -> /
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021] Started GET "/" for 127.0.0.1 at 2021-03-19 22:45:20 +0900
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021] Processing by LogCampaignsController#index as HTML
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021] Completed 500 Internal Server Error in 5097ms (ActiveRecord: 0.0ms)
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021]
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021] ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.096 seconds); all pooled connections were in use):
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021]
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021] app/models/diagnosis_log.rb:79:in `block in date_list'
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021] app/models/diagnosis_log.rb:78:in `date_list'
visualization_1 | [1d70ab69-19a1-4ea4-b6a9-600971b59021] app/controllers/application_controller.rb:9:in `set_variables'
visualization_1 | 127.0.0.1 - - [19/Mar/2021:22:45:20 JST] "GET / HTTP/1.1" 500 1477
visualization_1 | - -> /
visualization_1 | [33a74ef4-b717-489f-a589-be1455c23c76] Started GET "/" for 127.0.0.1 at 2021-03-19 22:45:27 +0900
visualization_1 | [33a74ef4-b717-489f-a589-be1455c23c76] Processing by LogCampaignsController#index as HTML
<!DOCTYPE html>
<html>
<head>
<title>We're sorry, but something went wrong (500)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body {
background-color: #EFEFEF;
color: #2E2F30;
text-align: center;
font-family: arial, sans-serif;
margin: 0;
}
div.dialog {
width: 95%;
max-width: 33em;
margin: 4em auto 0;
}
div.dialog > div {
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #BBB;
border-top: #B00100 solid 4px;
border-top-left-radius: 9px;
border-top-right-radius: 9px;
background-color: white;
padding: 7px 12% 0;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
}
h1 {
font-size: 100%;
color: #730E15;
line-height: 1.5em;
}
div.dialog > p {
margin: 0 0 1em;
padding: 1em;
background-color: #F7F7F7;
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #999;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-color: #DADADA;
color: #666;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
}
</style>
</head>
<body>
<!-- This file lives in public/500.html -->
<div class="dialog">
<div>
<h1>We're sorry, but something went wrong.</h1>
</div>
<p>If you are the application owner check the logs for more information.</p>
</div>
</body>
</html>
from sindan-docker.
This is visualization's performance issue. Closed.
from sindan-docker.
Docker footprints
20 minutes later
Only viz container continues to consume more and more memory resources...
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
36d85e9e03ce sindan-manager_manager_1 0.01% 7.789MiB / 7.775GiB 0.10% 12.5kB / 5.25kB 24.5MB / 0B 6
5c6451c12772 sindan-manager_db_1 0.01% 34.71MiB / 7.775GiB 0.44% 6.62kB / 11.2kB 57.3MB / 7.05MB 7
87e203756c06 sindan-manager_nginx_1 0.00% 5.25MiB / 7.775GiB 0.07% 1.3kB / 0B 15MB / 0B 2
271f429157fe sindan-docker_mysql_1 0.08% 253.5MiB / 7.775GiB 3.18% 1.19MB / 297MB 197kB / 25.3MB 33
1021694c52e3 sindan-docker_visualization_1 100.01% 4.136GiB / 7.775GiB 53.19% 297MB / 1.19MB 0B / 0B 12
from sindan-docker.
Related Issues (14)
- TravisCI: open /var/lib/docker/tmp/docker-import-XXX/repositories: no such file or directory HOT 1
- Unable to create rails container using pre-built image of DockerHub HOT 1
- Time to quit TravisCI and move to GHActions
- Support Blue-Green Deployment
- Migrating repositories to travis-ci.com
- Add migration rule
- denied: requested access to the resource is denied
- Add TLS proxy
- visualization imageにてserver.pidファイルが残り続ける
- Unable to login to web dashboard: failed to initialize database HOT 1
- TravisCI: Failed to publish image to DockerHub
- Update submodules to the latest (sindan/sindan-visualization)
- Update README
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sindan-docker.