bug: PDOException on local Linux host

Open
#274 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, linux, php
Domain
databases, devops

Research direction

Reproduce the database build using the local Linux and Docker configuration, then inspect tools/db/build/build.inc.php around line 163 and the callers in build_cli.php. Compare the Dockerfile variants and pinned images mentioned in the report; done means the database build no longer terminates with the PDOException.

Written by the indexing model from the issue text.

Description

bug

On my local Linux configuration with the master branch, I'm getting PDOException error which kills the db Docker app.

Error

(line number off by 1 for adding a diagnostic line)

$mssql->setAttribute(PDO::SQLSRV_ATTR_QUERY_TIMEOUT, 1000);
Running /var/www/html/.data/langtags.json.sql
Array
(
    [0] => 08S01
    [1] => 10054
    [2] => [Microsoft][ODBC Driver 18 for SQL Server]TCP Provider: Error code 0x2746
    [3] => 08S01
    [4] => 10054
    [5] => [Microsoft][ODBC Driver 18 for SQL Server]Communication link failure
)
...

Failure: PDOException: SQLSTATE[08S01]: [Microsoft][ODBC Driver 18 for SQL Server]TCP Provider: Error code 0x2746 in /var/www/html/tools/db/build/build.inc.php:163
Stack trace:
#0 /var/www/html/tools/db/build/build.inc.php(163): PDO->exec()
#1 /var/www/html/tools/db/build/build.inc.php(61): BuildDatabaseClass->sqlrun()
#2 /var/www/html/tools/db/build/build_cli.php(30): BuildDatabaseClass->BuildDatabase()
#3 {main}
Configuration

Host: Ubuntu 22.04
Docker Desktop Linux 4.39.0 (184744)
Image has
Linux 0d541bb09692 6.10.14-linuxkit #1 SMP PREEMPT_DYNAMIC Mon Feb 24 16:37:44 UTC 2025 x86_64 GNU/Linux
OpenSSL 1.1.1n 15 Mar 2022


Things tried (still getting same exception)
  • Adding this line to the Dockerfiles
RUN sed -i -E 's/(CipherString\s*=\s*DEFAULT@SECLEVEL=)2/\10/' /etc/ssl/openssl.cnf

based on this SO thread
https://stackoverflow.com/a/61111267/1836776

  • trying the image pinned on #270
  • trying the unpinned 2022-latest which pulled
FROM mcr.microsoft.com/mssql/server:2022-latest@sha256:ea73825f3d88a23c355ac2f9fdc6bd960fec90171c12c572109b36a558f77bb8
Dominant language
PHP
Stars
3
Forks
3
Avg merge
2d 4h
Merged PRs (30d)
6

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from keymanapp/api.keyman.com

All issues in keymanapp/api.keyman.com

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.