Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rank-math domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u996806617/domains/vidyut.net/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rank-math-pro domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u996806617/domains/vidyut.net/public_html/wp-includes/functions.php on line 6114
Varnish won’t start – Too many arguments (…) - Vidyut

Varnish won’t start – Too many arguments (\…)

So you set up Varnish. You really did everything right, but when you try to start it…

root@www:/etc/apache2/sites-available# service varnish start
* Starting HTTP accelerator varnishd [fail]
SMA.s0: max size 512 MB.
Too many arguments (\...)
usage: varnishd [options] -a …

and so on, and you have tried and tried to edit /etc/default/varnish till you’re ready to give up?

Varnish works fine if you start it from the command line with configuration (as described in the documentation – for testing), but fails to start as a daemon?

The problem is some invalid characters related with line break in the /etc/default/varnish file. They seem to be there in the original file itself. I was not able to fix the characters, but simply editing the file so that the whole configuration appears as one line works.

So, for example:

DAEMON_OPTS="-a :80 \
-T localhost:1234 \
-f /etc/varnish/default.vcl \
-s malloc,256m"

Becomes

DAEMON_OPTS="-a :80 -T localhost:1234 -f /etc/varnish/default.vcl -s malloc,256m"

This worked for me. If you don’t like this you could try fixing whatever the issue is with the linebreak. Do tell me if you figure it out.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *