Problems encountered during varnish usage

Source: Internet
Author: User
Tags varnish automake
Problem 1 encountered during varnish usage: varnish3 installation. Varnish2 and varnish3 have different parameters! Varnish2.x and varnish3.x have different compilation parameters! Execute autogen. sh first, and an error is returned! Solution: it prompts that automake, yum-yinstallauto... varnish is not found.

1: install varnish3. Varnish2 and varnish3 have different parameters! Varnish2.x and varnish3.x have different compilation parameters!
Execute autogen. sh first, and an error is returned!

Solution:
It prompts that automake and yum-y install automake are not found!
Run autogen. sh again. The error is as follows:

Solution:
Yum-y install libtool
Then execute sh autogen. sh!
Description:
Libtool is a common library that supports scripts. it hides the complexity of dynamic libraries in a unified and portable interface.

The next step is configure:
./Configure -- enable-debugging-symbols -- enable-developer-warnings -- enable-dependency-tracking -- prefix =/usr/local/varnish3
Make
Make install
The system prompts that the pcre cannot be found. see the attachment!

Solution: Yum-y install pcre-devel

2: The file descriptor is too small, leading to varnish startup failure.

Solution: ulimit-HSn 65535: adjust the file descriptor.

3: May 6 16:50:34 varnish2/data/varnish/cache [2144]:-T 192.168.2.185: 3500 cocould not be listened on. cause: Although varnish didn't start listening on port 80, it started at Port 3500, so the above prompt is similar when varnish is started again.
Solution:
Lsof-I: 3500
Kill the corresponding pid
Then restart!
4: varnish finally solves the problem regardless of whether it is sent. The reason is: the configuration file contains the following configuration:

In my testing environment (the environment virtualized on my machine) I use www.abc.com for testing, so it must be normal! However, in another test environment, I only modified the addresses and ports of web2 and web3, but did not modify the configuration of www.test.com!
It can be changed to the following!

# If you do not modify the related content of www.test.com, after www.test.com is resolved to varnish, varnish will always access this machine no matter whether the background machine is down or not!
This is a waste of two days! # Carelessly killing people
5: Create worker thread failed 11 Resource temporarily unavailable cause: when varnishd is started,
Ulimit-SHn 65535
/Usr/local/varnish/sbin/varnishd-f/usr/local/varnish/etc/varnish/default. vcl-a 192.168.2.184: 80-u varnish-g varnish-n/data/varnish/cache-p thread_pool_max = 5000-pthread_pools = 1-h classic, 500009-p lru_interval = 20-p listen_depth = 1024-s malloc, 512 M-w 3500, 10-T 192.168.2.184:

Pay attention to the red font part. when I set it to 2, the above error is generated. the problem can be solved by modifying it to 1. the main reason is that I tested it using vm, and I only had one cpu! So the above error will be reported!
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.