[Dispatcher] .stat file not generated | Community
Skip to main content
Level 2
October 1, 2018
Solved

[Dispatcher] .stat file not generated

  • October 1, 2018
  • 11 replies
  • 9718 views

Hi,

I'm configuring dispatcher to generate the .stat file from the config:

/cache

{

  # the cacheroot must be equal to the document root of the webserver

  /docroot "/mnt/cache"

  # sets the level upto which files named ".stat" will be created in the

  # document root of the webserver. when an activation request for some

  # handle is received, only files within the same subtree are affected

  # by the invalidation.

  /statfileslevel "1"

}

By right, the stat file should be auto-generated at docroot (/mnt/cache) when I restart apache, but there was no file generated (I check with command ls -la).

From the log when I access the dispatcher:

[Thu Sep 27 10:43:05 2018] [D] [pid 19238] Found farm publishfarm for dispatcher

[Thu Sep 27 10:43:05 2018] [D] [pid 19238] checking [/content/mywebsite/en.html]

[Thu Sep 27 10:43:05 2018] [D] [pid 19238] never flushed [/mnt/cache/content/mywebsite/.stat] -> use cache [/mnt/cache/content/mywebsite/en.html]

[Thu Sep 27 10:43:05 2018] [D] [pid 19238] cache-action for [/content/mywebsite/en.html]: DELIVER

[Thu Sep 27 10:43:05 2018] [D] [pid 19238] request declined

[Thu Sep 27 10:43:05 2018] [I] [pid 19238] "GET /content/mywebsite/en.html" - - 0ms

Please advise me on this. Any help would be appreciated.

My dispatcher version is 4.2.2 for Apache 2.4 on Linux 64 bit.

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aneetarora

Hello Manh,

The behavior you're seeing is expected. It's because you've added the statefileslevel with a value of "1".

The value of "1" means that there will be two .stat files, one at the docroot itself, and another one at docroot and one at the /content directory. So you should see a .stat file in the /mnt/cache and at /mnt/cache/content directories.

If you wish to see a .stat file generated for every single one of your content levels, you'll have to change the statfileslevel to "6", or "7" or to the depth of your site structure and then replicate a page. For example, if you wish to see the .stat file at /content/mywebsite/test1/test2/test3/test4, you'll have to set the statfileslevel to "7", restart the dispatcher and replicate the page to see the .stat file.

For further information about this stat file's usage and it's implications, please check Configuring Dispatcher

Best Regards,

Aneet Arora

11 replies

Level 2
June 3, 2022

I'm having the same issue. The ".stat" file was never created. When the page is activated I don't see any logs in dispatcher_log file. Was hoping to see log something like this when the page is activated.

[Sat Jan 09 21:07:19 2021] [D] [pid 8:tid 139698416600832] Found farm sites for localhost
[Sat Jan 09 21:07:19 2021] [D] [pid 8:tid 139698416600832] checking [/dispatcher/invalidate.cache]
[Sat Jan 09 21:07:19 2021] [I] [pid 8:tid 139698416600832] Activation detected: action=Activate [/content/we-retail/us/en]
[Sat Jan 09 21:07:19 2021] [I] [pid 8:tid 139698416600832] Touched /etc/httpd/httpd_www/aem_sites/.stat
[Sat Jan 09 21:07:19 2021] [D] [pid 8:tid 139698416600832] response.status = 200
[Sat Jan 09 21:07:19 2021] [D] [pid 8:tid 139698416600832] response.headers[Server] = "Communique/2.6.3 (build 5221)"
[Sat Jan 09 21:07:19 2021] [D] [pid 8:tid 139698416600832] response.headers[Content-Type] = "text/html"
[Sat Jan 09 21:07:19 2021] [D] [pid 8:tid 139698416600832] cache flushed
[Sat Jan 09 21:07:19 2021] [I] [pid 8:tid 139698416600832] "GET /dispatcher/invalidate.cache" 200 purge [sites/-] 7ms

 

In Flush Agent, when I test the connection I see the connection properly established however, I see the success message something like this.
022-06-03 00:00:42 - << color: #EB957D;
2022-06-03 00:00:42 - << text-shadow: 0 0 3px black;
2022-06-03 00:00:42 - << }
2022-06-03 00:00:42 - << </style>
2022-06-03 00:00:42 - << </head>
2022-06-03 00:00:42 - << <body>
2022-06-03 00:00:42 - << <div class="error-page-wrap">
2022-06-03 00:00:42 - << <article class="error-page gradient">
2022-06-03 00:00:42 - << <hgroup>
2022-06-03 00:00:42 - << <h1>403</h1>
2022-06-03 00:00:42 - << <h2>Are you lost?</h2>
2022-06-03 00:00:42 - << <br/>
2022-06-03 00:00:42 - << </hgroup>
2022-06-03 00:00:42 - << </article>
2022-06-03 00:00:42 - << </div>
2022-06-03 00:00:42 - << </body>
2022-06-03 00:00:42 - << </html>
2022-06-03 00:00:42 - Message sent.
2022-06-03 00:00:42 - ------------------------------------------------
2022-06-03 00:00:42 - Replication (TEST) of /content successful.

 

not sure where is wrong? I made sure there is not permission issue from dispatcher side. 


Thank you!