# FastCGI sent in stderr: "PHP message: PHP Warning: Constant WP\_CRON\_LOCK\_TIMEOUT already defined

**URL:** <https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237>\
**Category:** Questions\
**Created:** [April 2, 2024, 10:22pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237 "2024-04-02T22:22:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![calmond](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@calmond](https://community.kinsta.com/u/calmond)\
**Post date:** [April 2, 2024, 10:22pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/1 "2024-04-02T22:22:01Z")

</div>

Getting the following error in my error log after upgrading to 8.1.

2024/04/02 20:36:22 [error] 27135#27135: \*83883 FastCGI sent in stderr: “PHP message: PHP Warning: Constant WP\_CRON\_LOCK\_TIMEOUT already defined in /xxxx/public/wp-config.php on line 91PHP message: PHP Warning: Constant AUTOSAVE\_INTERVAL already defined in xxxxx/public/wp-config.php on line 92PHP message: PHP Warning: Constant WP\_POST\_REVISIONS already defined in /xxxxxx/public/wp-config.php on line 93PHP message: PHP Warning: Constant EMPTY\_TRASH\_DAYS already defined in /xxxxxx/public/wp-config.php on line 94”, client: xxxxxx, server: xxxxxxx, request: “GET / HTTP/2.0”, host: “xxxxx”

Looked for FastCGI plugin and none present. There must be another plugin using it that causing this?

Any ideas where to look?

---

<div class="post-metadata">

**Author:** ![Adrian\_L](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/adrian_l/32/2810_2.png) [@Adrian\_L](https://community.kinsta.com/u/Adrian_L)\
**Post date:** [April 3, 2024, 2:15am UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/3 "2024-04-03T02:15:11Z")

</div>

Hello @calmond 👋

I would like to welcome you to the Kinsta Community!

If you need to find files where the WordPress constants can be found, you can use the grep command via SSH. For instance, if you need to locate “ **WP\_CRON\_LOCK\_TIMEOUT** ”, you can run the command `grep -rl "WP_CRON_LOCK_TIMEOUT" ~/public`. By running the grep command, you can search for entries containing “WP\_CRON\_LOCK\_TIMEOUT” recursively from the **~/public** folder.

To log in via SSH, please refer to our help article at [WordPress Hosting - SSH - Kinsta® Docs](https://kinsta.com/docs/wordpress-hosting/connect-to-ssh/) for detailed instructions.

I hope it helps!

---

<div class="post-metadata">

**Author:** ![calmond](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@calmond](https://community.kinsta.com/u/calmond)\
**Post date:** [April 3, 2024, 5:12pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/4 "2024-04-03T17:12:21Z")

</div>

HI Adrian.

Thank you very much for sharing the grep command.

That did indeed show where the additional declarations reside:

/www/xxxxxxxx/public/wp-content/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-defaults.php- ‘ALTERNATE\_WP\_CRON’,

/www/xxxxxxxx/public/wp-content/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-defaults.php: ‘WP\_CRON\_LOCK\_TIMEOUT’,

/www/xxxxxxxx/public/wp-content/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-defaults.php- ‘PHP\_VERSION’,

Although this is puzzling as I have deleted the jetpack plugin yet it is still present in the file system.

I guess its safe to just ignore this error in the logs?

(I’m afraid to delete the Jetpack directory)

Thank you,

-Chris.

FULL GREP RESPONSE -----------------

/www/xxxxxxxx/public/wp-cron.php- // Called from external script/job. Try setting a lock.

/www/xxxxxxxx/public/wp-cron.php: if ( $doing\_cron\_transient && ( $doing\_cron\_transient + WP\_CRON\_LOCK\_TIMEOUT \> $gmt\_time ) ) {

/www/xxxxxxxx/public/wp-cron.php- return;

---

<div class="post-metadata">

**Author:** ![jackirish](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jackirish/32/1361_2.png) [@jackirish](https://community.kinsta.com/u/jackirish)\
**Post date:** [April 3, 2024, 8:46pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/5 "2024-04-03T20:46:12Z")

</div>

Hi @calmond ! 👋

The error in question ( **Constant already defined** ) indicates that the entries in your wp-config.php file have duplicate entries that are being loaded elsewhere. This can be an issue if your application (WordPress) is expecting one value for one of those entries, and it’s being overwritten by the variable being specified somewhere other than where you set the value originally.

You can remove or comment out those entries from wp-config.php to stop the errors if you don’t need those variables defined there.

Otherwise, you would want to remove or edit the secondary locations where those variables are being specified, to eliminate the duplication.

However by itself this error this error is not fatal to the site operation, so you can ignore it if you would like.

---

<div class="post-metadata">

**Author:** ![calmond](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@calmond](https://community.kinsta.com/u/calmond)\
**Post date:** [April 17, 2024, 1:06am UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/6 "2024-04-17T01:06:26Z")

</div>

Still getting errors in log…even though jetpack directory is now gone…

Lates grep results…

mailhippo@rhc-mailhippo-live-prod:~$ grep -rl “WP\_CRON\_LOCK\_TIMEOUT” ~/public  
/www/mailhippo\_201/public/wp-cron.php  
/www/mailhippo\_201/public/wp-includes/default-constants.php  
/www/mailhippo\_201/public/wp-includes/cron.php  
/www/mailhippo\_201/public/wp-config.php  
/www/mailhippo\_201/public/wp-content/plugins/updraftplus/updraftplus.php

---

<div class="post-metadata">

**Author:** ![calmond](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@calmond](https://community.kinsta.com/u/calmond)\
**Post date:** [April 17, 2024, 1:14am UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/7 "2024-04-17T01:14:45Z")

</div>

Disabled and Removed updraftPlus plugin using console.  
Restarted PHP engine.  
Still getting errors.

---

<div class="post-metadata">

**Author:** ![calmond](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@calmond](https://community.kinsta.com/u/calmond)\
**Post date:** [April 17, 2024, 1:15am UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/8 "2024-04-17T01:15:38Z")

</div>

`2024/04/17 01:14:02 [error] 121249#121249: *289836 FastCGI sent in stderr: "PHP message: PHP Warning: Constant WP_CRON_LOCK_TIMEOUT already defined in /www/mailhippo_201/public/wp-config.php on line 97PHP message: PHP Warning: Constant AUTOSAVE_INTERVAL already defined in /www/mailhippo_201/public/wp-config.php on line 98PHP message: PHP Warning: Constant WP_POST_REVISIONS already defined in /www/mailhippo_201/public/wp-config.php on line 99PHP message: PHP Warning: Constant EMPTY_TRASH_DAYS already defined in /www/mailhippo_201/public/wp-config.php on line 100" while reading response header from upstream, client: 174.163.22.49, server: www.mailhippo.com, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php8.1-fpm-mailhippo.sock:", host: "www.mailhippo.com:48033", referrer: "https://www.mailhippo.com/wp-admin/plugins.php?plugin_status=all&paged=1&s"`

---

<div class="post-metadata">

**Author:** ![Adrian\_L](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/adrian_l/32/2810_2.png) [@Adrian\_L](https://community.kinsta.com/u/Adrian_L)\
**Post date:** [April 17, 2024, 2:56am UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/9 "2024-04-17T02:56:01Z")

</div>

@calmond 👋

It appears that the problem you’re experiencing may be related to cached data. I recommend clearing the cache in **MyKinsta \> Your site \> Server cache (clear cache)**. This is because your staging site has the same custom configuration in its wp-config.php file but is not displaying any PHP warnings.

Let us know how it goes.

---

<div class="post-metadata">

**Author:** ![calmond](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@calmond](https://community.kinsta.com/u/calmond)\
**Post date:** [April 17, 2024, 6:48pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/10 "2024-04-17T18:48:13Z")

</div>

Thanks for the reco.

Cleared cache by:  
MyKinsta \> MailHippo \> Tools \> Server cache \> Clear cache.

Still getting same errors.

---

<div class="post-metadata">

**Author:** ![jackirish](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jackirish/32/1361_2.png) [@jackirish](https://community.kinsta.com/u/jackirish)\
**Post date:** [April 17, 2024, 8:56pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/11 "2024-04-17T20:56:16Z")

</div>

Hi @calmond

I was able to take a look at the site itself; currently the wp-config.php file has a set of constants, including WP\_CRON\_LOCK\_TIMEOUT, loading _after_ this section:

```auto
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
        define('ABSPATH', dirname( __FILE__ ) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

```

Can you please move these lines _before_ this line in wp-config.php?

```auto
/* That's all, stop editing! Happy blogging. */

```

Then clear caches for the site. I believe that should resolve these errors you’re receiving.

---

<div class="post-metadata">

**Author:** ![calmond](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@calmond](https://community.kinsta.com/u/calmond)\
**Post date:** [April 17, 2024, 9:38pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/12 "2024-04-17T21:38:30Z")

</div>

Jack.  
Thanks for the troubleshooting and the tip.

Your suggestion worked flawlessly. No more errors.

Thank you!!

I wonder how those lines got put there in the wp-config.php.  
I don’t monkey with that file.

At least its fixed now.

Thanks again.  
-Chris.

---

<div class="post-metadata">

**Author:** ![jackirish](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jackirish/32/1361_2.png) [@jackirish](https://community.kinsta.com/u/jackirish)\
**Post date:** [April 19, 2024, 10:03pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/13 "2024-04-19T22:03:51Z")

</div>

Hi @calmond ,

Awesome, I’m glad to hear it! Please let us know if you have any other questions as well.

Best,  
Jack

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)\
**Post date:** [April 22, 2024, 10:04pm UTC](https://community.kinsta.com/t/fastcgi-sent-in-stderr-php-message-php-warning-constant-wp-cron-lock-timeout-already-defined/3237/14 "2024-04-22T22:04:44Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
