[TYPO3-Solr] "Request ID mismatch" - how/where to start debugging it?

Søren Malling soren.malling at gmail.com
Sun Mar 8 22:23:30 CET 2015


Hi again!

Just a follow up on this issue!

The problem was a hosting provider, who installed the default varnish
package for Ubuntu and didn't mind telling that it was activated for all
environments, that meaning that all requests where cached, and the wrong
requestId was returned!

So.. what do you do when you don't have sudo rights on the server so you're
not able to add the Varnish configuration from the Solr wiki[1] and have to
wait for the sysadm to meet in next weekeday?

Simple! You make use of the dataUrlModifier hook, available inside the
PageIndexer->getDataUrl method and creates a method like this

        public function modifyDataUrl($pageUrl, array $urlData) {
                return $pageUrl . '&timestamp=' . round(microtime(true) *
1000);
        }

What it simply does, is to give a "timestamp" argument to the request, and
because that timestamp will be unique every time, Varnish can't show cached
information! It will send the request to it's backend (the TYPO3
installation) and get the correct response from Varnish with the correct
requestId and your indexing will run smoothly :)

Thanks for a great hook!

Cheers and have a great evening!

Søren

[1] https://forge.typo3.org/projects/extension-solr/wiki/Varnish

On Sun, Mar 8, 2015 at 5:43 PM, Olivier Dobberkau <olivier.dobberkau at dkd.de>
wrote:

> Am 08.03.15 um 15:46 schrieb Søren Malling:
>
>  Hint, advices, anything is welcomed!
>>
>
> which php?
>
> Olivier
>
> _______________________________________________
> TYPO3-project-solr mailing list
> TYPO3-project-solr at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
>


More information about the TYPO3-project-solr mailing list