首页 > 解决方案 > AWS Elatic Memcache 日志堆积在应用程序服务器中

问题描述

我在 Java 中实现了 Elastic Memcahce,并使用以下代码部署在 WildFly 应用程序服务器上,当我部署在 AWS 上时,一些如何获取不间断记录器的方法如下,哪些会占用我的服务器日志大小。有人可以帮我做一些需要做的设置。

String configEndpoint = "xxxx.xxxx.xxx.xxx.cache.amazonaws.com";
Integer clusterPort = 11211;
MemcachedClient client = new MemcachedClient(new InetSocketAddress(configEndpoint, clusterPort));
client.set("key1", 1000, "test");
System.out.println("----Get From Cache-----"+client.get("key1"));
client.shutdown();

图书馆:

<dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>elasticache-java-cluster-client</artifactId>
    <version>1.1.1</version>  
</dependency> 

错误日志

2018-06-06 23:42:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:42:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:43:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:43:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:43:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:43:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:44:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:44:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:44:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:44:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:45:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:45:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:45:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:45:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:46:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:46:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:46:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:46:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:47:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:47:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:47:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:47:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:48:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:48:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:48:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:48:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:49:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:49:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:49:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:49:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:50:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:50:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:50:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:50:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:51:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:51:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:51:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:51:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:52:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:52:58.044 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.

标签: memcachedamazon-elasticachespymemcached

解决方案


推荐阅读