Thursday, April 10, 2008

ว่าด้วยตัว test jabber (ต่อ2) เพิ่ม memory ให้ openfire

เพิ่มเติมการเพิ่ม memory ให้ openfire จะมีอะไรนิดหน่อยที่ บางทีมันไปเปลี่ยนตามที่ตั้งไว้ใน file
ไม่รู้เพราะต้อง restrat server หรืออย่างไร แต่ถ้า restart server ไม่ได้ เราก็ต้องเข้าไปแก้ตรงๆที่ script openfire.sh
ซึ่งอยู่ใน directory ที่เรา setup openfire เอาไว้ ในที่นี้ผมอยู่ที่ /opt/openfire/bin

แก้ตามนี้
http://www.igniterealtime.org/community/message/167950
/opt/openfire/bin/openfire.sh ==> vi it and goto
line

OPENFIRE_OPTS="${OPENFIRE_OPTS}
-DopenfireHome=${OPENFIRE_HOME}"

then
change to..

OPENFIRE_OPTS="-Xms1024m -Xmx2048m
-DopenfireHome=${OPENFIRE_HOME}"


เป็นการแก้แบบขอไปทีแต่ก็ได้ผล ส่วนใน windows วิธีที่สร้าง file properties นั้นใช้ได้ดีเลยไม่ได้หาวิธีแก้แบบขอไปที
บน windows เค้าทำเป็น exe มาแล้วด้วย ถ้าจะทำคงยากหน่อย

ลองทำแล้วครับ บน windows ให้สร้าง config file 2 ตัวน่ะ
ตามนี้

http://www.igniterealtime.org/community/message/151499

If you are using windows, in the bin folder under your openfire
directory,
you need to create/edit 1 of two files.
If running via the GUI console, create/edit the file

''openfired.vmoptions''.

In this file, add the following lines...

-Xms512m
-Xmx1024m

If you are running as a service,
copy the file to another file named,

''openfire-service.vmoptions''.

Hope this helps.

Message was edited by: ldove



มีอีกเรื่องที่เจอวันนี้ Tom run openfire server ในแบบ service ดังนั้นเวลา restart จะเรียกโดย
ผ่าน service

$> service openfire restart


การแก้ momory แบบเดิมจะไม่เปลี่ยน ต้องไปแก้ที่ /etc/sysconfig/openfire ตามนี้

Greetings,

Add a line like this in /etc/sysconfig/openfire

OPENFIRE_OPTS="-Xms256m -Xmx512m"

daryl


เอา mem เท่าไรก็ใส่ไป ได้ผลสำหรับ service ครับ

No comments: