No, the page did not load properly the first time. I see
{"status":"500","code":"ECONNRESET","message":"select count(*) as `Total` from (select `A`.`boat_id`, `A`.`boat_model`, `A`.`build_year`, `A`.`boat_desc_short`, `A`.`boat_length`, `A`.`boat_type`, `A`.`asking_price`, `A`.`page_url_slug`, `B`.`file_name`, `B`.`file_path`, `B`.`alt_text`, `C`.`slug`, `C`.`cat_name`, `B`.`file_thumb_path` from `m_boats` as `A` inner join `t_boat_pics` as `B` on `B`.`boat_id` = `A`.`boat_id` inner join `m_boat_category` as `C` on `C`.`id` = `A`.`boat_type` left join `m_users` as `D` on `D`.`user_id` = `A`.`boat_owner_id` inner join `vw_boat_status` on `vw_boat_status`.`boat_id` = `A`.`boat_id` where `A`.`deleted_on` is null and `B`.`inactive_on` is null and (`B`.`sort_order` is null or `B`.`sort_order` = 1) and (`A`.`listing_status` = 'elite' or `A`.`listing_status` = 'featured') and `vw_boat_status`.`boat_status` <> 'Sold') as `t1` limit 1 - read ECONNRESET","stack":"Error: read ECONNRESET\n at TCP.onStreamRead (node:internal/stream_base_commons:220:20)\n --------------------\n at Protocol._enqueue (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at Connection.query (/usr/src/app/node_modules/mysql/lib/Connection.js:198:25)\n at /usr/src/app/node_modules/knex/lib/dialects/mysql/index.js:132:18\n at new Promise (<anonymous>)\n at Client_MySQL._query (/usr/src/app/node_modules/knex/lib/dialects/mysql/index.js:126:12)\n at executeQuery (/usr/src/app/node_modules/knex/lib/execution/internal/query-executioner.js:37:17)\n at Client_MySQL.query (/usr/src/app/node_modules/knex/lib/client.js:144:12)\n at Runner.query (/usr/src/app/node_modules/knex/lib/execution/runner.js:130:36)\n at ensureConnectionCallback (/usr/src/app/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17)\n at Runner.ensureConnection (/usr/src/app/node_modules/knex/lib/execution/runner.js:272:20)\n at async Runner.run (/usr/src/app/node_modules/knex/lib/execution/runner.js:30:19)\n at async App.paged (/usr/src/app/lib/modules/dbconnector.js:130:23)\n at async App._exec (/usr/src/app/lib/core/app.js:485:30)\n at async App.exec (/usr/src/app/lib/core/app.js:425:9)\n at async App.condition (/usr/src/app/lib/modules/core.js:100:13)\n at async App._exec (/usr/src/app/lib/core/app.js:485:30)"}
Not exactly sure what goes wrong, the error is generated by the mysql client which looses connection. Please check the database connection. Do other queries to the database work?
So this is the only action with a database query that fails?
First check if the problem is resolved after a server restart. In the video I see that it fails on the count query of a paged query, does it also fail if you change it to a normal query?
I won’t be able to get to these questions today. Luckily, that’s just a functional prototype and not live yet. I’ll look into your questions and update.