Query Error ERROR: query failed: INSERT INTO `keys` (`name`, `value`) VALUES (?, ?) - Error: Duplicate entry ‘sixa’ for key ‘name’

hi @rickzimm, please see the recommended php settings .

These are my settings:
short_open_tag = Off
max_execution_time = 300
max_input_time = 300 (-1 can’t be set from the provider, 600 is possible)
max_input_vars = 3000
memory_limit = 512M
display_errors = Off
log_errors = On
post_max_size = 32M
file_uploads = On
upload_max_filesize = 32M
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
mysqli.allow_local_infile = On

those differ from what the error log is stating, is there another php.ini for the fcgid module, like in /etc/php/7.3/fpm/php.ini for example?

specifically, php is currently finding a 128M memory_limit.

Hi @stephenwaite,

You are correct, a few months ago I asked, after the migration to a new system from the provider, to implement the correct settings. Before the migration I could do it myself via .htaccess.
Today, I asked them to check the settings again and they made a correction, and checked it in my phpinfo.php
The 2 corrections are:
short_open_tag to off
memory_limit to 512M

Unfortunately, after the corrections the errors still appears.

Hi @brady.miller,

On Thursday 07/22 I have sent an email to your email address (Brady Miller (brady.g.miller@gmail.com)).

Maybe this will help solving the problems more easier.
Note: because of privacy information I have sent it directly to you.

Will this help you out more?

Got this in the error log. Do have quite a few database log outs per day.

2021-07-20 3:37:06 140326695683840 [Warning] Aborted connection 262180 to db: ‘information_schema’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2021-07-20 3:37:06 140326686160640 [Warning] Aborted connection 262181 to db: ‘wp189’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)
2021-07-20 3:37:06 140326693226240 [Warning] Aborted connection 262183 to db: ‘information_schema’ user: ‘root’ host: ‘localhost’ (Got an error reading communication packets)

@brady.miller where do I put this code?
error_log("DEBUG_trace " . print_r(debug_backtrace(), true));

Hi @tjbarr,
Select the link @brady.miller added in the message where this code is mentioned. In your file put the code on the next line.
To do this you need access to your files.
Do you have access to your files for instance using FTP?

@rickzimm ,
try this command instead:

error_log("DEBUG_trace " . print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), true));

and if still have memory error, then try this one:

error_log("DEBUG_trace " . print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10), true));

@brady.miller
Here the error_log belonging to the first code line: Error log 07-27-2021 - 1st code.pdf (152.0 KB)

And also the error_log belonging to the second line: Error log 07-27-2021 - 2nd code.rar (793.0 KB)
Note: file is very large (zipped it)

I only get this error when I go to fees-> billing manager.

It checks the value and it is definitely there but it still falls into the query:

if (empty($sqlValue[‘value’])) {
// Create a new key and place in database
// Produce a 256bit key (32 bytes equals 256 bits)
$newKey = RandomGenUtils::produceRandomBytes(32);
if (empty($newKey)) {
error_log(‘OpenEMR Error : Random Bytes error - exiting’);
die();
}

my collations are not UTf8_general. I am not sure if they were before the upgrade

Hi @tjbarr, did you have the documents in place when you ran sql_upgrade? It’s important that the prior key in sites/default/documents/logs_and_misc/methods/sixa(b) were there.

No. I didn’t. My documents weren’t linking so I redid it and they worked.

should those match the ones in the database?

here’s some background on the keys

Hi @brady.miller,

Were you able to find anything in the error logs?

Hi @brady.miller

Could you find any issues in the error-logs?
Can you help me with this or should I find a programmer?
Note: I would like to fix the problem before it gets worse and am reluctant to implement the latest update.

Hi @sjpadgett,

I need some advice, therefore I have sent you a separate email to your email address …

Thank you.

hi @rickzimm ,
Sorry for the delayed response. Didn’t find anything obvious in those logs. At this point the error appears to be secondary to a basic sql query that is not working (something that should never happen and if that is happening then would expect other strange behavior on your system). Guessing related to the connection to the mysql/mariadb server and rec getting a developer to check out your system/environment to further isolate/fix the issue.