|
1
|
How to expand the java heap space in tomcat
|
|
2
|
=============================
|
|
3
|
-add the setenv.sh to the tomcat/bin folder
|
|
4
|
-increase the heap space to lager value
|
|
5
|
in this eg. it's 1024M (1G)
|
|
6
|
XMS="512M" (start memory)
|
|
7
|
XMX="1024M" (heap space)
|
|
8
|
XSS="256k" (select ...)
|
|
9
|
PERMSIZE="128M"
|
|
10
|
MAXPERMSIZE="128M"
|
|
11
|
NEWSIZE="320M"
|
|
12
|
MAXNEWSIZE="320M"
|
|
13
|
SURVIVORRATIO="2"
|
|
14
|
TARGETSURVIVORRATIO=80
|
|
15
|
JAVAENV="java.awt.headless=true"
|
|
16
|
JVM_OPT="-d64"
|
|
17
|
|
|
18
|
-restart the tomcat
|
|
19
|
-then tomcat will execute that file
|
|
20
|
-the condition to run that file is in catalina.sh
|
|
21
|
-the statements are -
|
|
22
|
if [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then
|
|
23
|
. "$CATALINA_BASE"/bin/setenv.sh
|
|
24
|
elif [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
|
|
25
|
. "$CATALINA_HOME"/bin/setenv.sh
|
|
26
|
fi
|
|
27
|
|
|
28
|
============================
|
|
29
|
Updating Multiple tables query string
|
|
30
|
------------------------------------------
|
|
31
|
update keywords6,adgroups6 set keywords6.adgid = adgroups6.adgroupId where keywords6.adGroupId =adgroups6.id;
|
|
32
|
|
|
33
|
******************************
|
|
34
|
MySQL Notes
|
|
35
|
**********
|
|
36
|
%d (00..31) day
|
|
37
|
%m (00..12) month
|
|
38
|
%Y (four digit year)
|
|
39
|
%l (1..12) Hour
|
|
40
|
%i (00..59) Minutes
|
|
41
|
%s (00..59) Seconds
|
|
42
|
|
|
43
|
select cost,date from rpkeyworddailyacc15cam1adg1
|
|
44
|
where keywordid = 321856808 and date>'2009-07-09 00:00:00' and date <='2009-09-19 00:00:00';
|
|
45
|
|
|
46
|
select cost,keywordid from rpkeyworddailyacc15cam1adg1 where keywordid = 10005070;
|
|
47
|
|
|
48
|
select cost, keywordid,date from rpkeyworddailyacc15cam1adg1;
|
|
49
|
|
|
50
|
select id,date_format(str_to_date(operationDateTime, "%d/%m/%Y %H:%i:%s"), "%m-%d-%Y %H:%i:%s") from logs3;
|
|
51
|
|
|
52
|
select id, str_to_date(operationDateTime, "%d/%m/%Y %h:%i:%s") from logs3 where date_format(str_to_date(operationDateTime, "%d/%m/%Y %h:%i:%s"),"%Y-%m-%d") > '2009-09-29'
|
|
53
|
and date_format(str_to_date(operationDateTime, "%d/%m/%Y %h:%i:%s"),"%Y-%m-%d") <= '2009-10-02';
|
|
54
|
|
|
55
|
select count(confirmStatus) from rp2pm_10_1_1 where (confirmStatus = 1 or confirmStatus = 0) and keywordId = 2 and conversionDate > '2009-08-09' and conversionDate <= '2009-08-10';
|
|
56
|
|
|
57
|
select id, str_to_date(operationDateTime, "%d/%m/%Y %h:%i:%s") from logs3;
|
|
58
|
|
|
59
|
select keywords10.*,count(rp2pm_10_1_1.confirmStatus) from keywords10 left outer join rp2pm_10_1_1 on
|
|
60
|
keywords10.id = rp2pm_10_1_1.keywordId and (rp2pm_10_1_1.confirmStatus = 1 or rp2pm_10_1_1.confirmStatus = 0)
|
|
61
|
and Date_format(rp2pm_10_1_1.conversionDate,"%d/%m/%Y") >= keywords10.statsFromDate and Date_format(rp2pm_10_1_1.conversionDate,"%d/%m/%Y") <= keywords10.statsToDate
|
|
62
|
where keywords10.adgroupid = 1 group by keywords10.id;
|
|
63
|
|
|
64
|
SELECT DATE_FORMAT(rpkeyworddailyacc10cam7adg52.date,"%d/%m/%Y"),rpkeyworddailyacc10cam7adg52.keyword,rpkeyworddailyacc10cam7adg52.keywordid,rpkeyworddailyacc10cam7adg52.pos,rpkeyworddailyacc10cam7adg52.clicks,rpkeyworddailyacc10cam7adg52.conv,rpkeyworddailyacc10cam7adg52.cost,rpkeyworddailyacc10cam7adg52.imps, COUNT(rp2pm_10_7_52.id)
|
|
65
|
FROM rpkeyworddailyacc10cam7adg52 left outer join keywords10 on keywords10.keywordid = rpkeyworddailyacc10cam7adg52.keywordid
|
|
66
|
left outer join rp2pm_10_7_52 on rp2pm_10_7_52.keywordid = keywords10.id and
|
|
67
|
DATE_FORMAT(rpkeyworddailyacc10cam7adg52.date,"%Y-%m-%d") = DATE_FORMAT(rp2pm_10_7_52.conversionDate,"%Y-%m-%d")
|
|
68
|
AND DATE_FORMAT(rp2pm_10_7_52.conversionDate,"%Y-%m-%d") >= DATE_FORMAT(STR_TO_DATE('31/10/2009',"%d/%m/%Y"),"%Y-%m-%d")
|
|
69
|
AND DATE_FORMAT(rp2pm_10_7_52.conversionDate,"%Y-%m-%d") <= DATE_FORMAT(STR_TO_DATE('01/11/2009',"%d/%m/%Y"),"%Y-%m-%d")
|
|
70
|
where DATE_FORMAT(rpkeyworddailyacc10cam7adg52.date,"%Y-%m-%d") >= DATE_FORMAT(STR_TO_DATE('31/10/2009',"%d/%m/%Y"),"%Y-%m-%d")
|
|
71
|
AND DATE_FORMAT(rpkeyworddailyacc10cam7adg52.date,"%Y-%m-%d") <= DATE_FORMAT(STR_TO_DATE('01/11/2009',"%d/%m/%Y"),"%Y-%m-%d")
|
|
72
|
GROUP BY DATE_FORMAT(rpkeyworddailyacc10cam7adg52.date,"%Y-%m-%d"),rpkeyworddailyacc10cam7adg52.keyword;
|
|
73
|
***********************
|
|
74
|
<Context docBase="okadaseo" path="/okadaseo" reloadable="true" source="org.eclipse.jst.j2ee.server:okadaseo">
|
|
75
|
<Resource auth="Container" characterEncoding="utf8" driverClassName="com.mysql.jdbc.Driver" maxActive="100" maxIdle="30" maxWait="-1" name="okadaseo" password="admin" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/okadaSeo?autoReconnect=true" useUnicode="true" username="root"/>
|
|
76
|
</Context>
|
|
77
|
|
|
78
|
|