[Note] Fix GeoServer Sorry, your session timed out…

Table of Contents

Fix GeoServer Sorry, your session timed out... Hôm bữa, sau khi cài xong GeoServer với Tomcat trên Kunbutu, mình không kiểm tra. Nay mấy đứa sinh viên mình dạy WebGIS cần mượn để upload bản đồ lên thì mới kiểm tra thấy bị cái lỗi này :v https://dothanhlong.org/tutorial-install-tomcat-7-and-geoserver-on-linux-kubuntu-distro/ Cái lỗi này đại loại là do Java Heap Memory được set quá ít, không đủ xử lý :') (VPS ram có 1GB hà, kaka) Nhận diện lỗi GeoServer Sorry, your session timed out... Khi bị lỗi này, chúng ta sẽ không thể tạo, thêm bất cứ cái gì vào GeoServer. Khi thêm nó cứ báo

Sorry, your session timed out... It looks like you waited too long to make that last change.if this continues to happen, you should get in touch with your system administrator. Go back to the home page and try again.

Sửa lỗi GeoServer Sorry, your session timed out...

Để sửa lỗi này thì cần kéo cái Java Heap Memory lên Sau khi dạo một vòng trên mạng thì mình cũng sửa được Chúng ta cần edit file tomcat7

Edit file tomcat7

/etc/default/tomcat7

[caption id="attachment_1009" align="alignnone" width="906"]Edit file tomcat7 Edit file tomcat7[/caption] Sửa dòng JAVA_OPTS lại
# You may pass JVM startup parameters to Java here. If unset, the default # options will be: -Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC # # Use "-XX:+UseConcMarkSweepGC" to enable the CMS garbage collector (improved # response time). If you use that option and you run Tomcat on a machine with # exactly one CPU chip that contains one or two cores, you should also add # the "-XX:+CMSIncrementalMode" option. JAVA_OPTS="-Djava.awt.headless=true -Xmx256m -XX:+UseConcMarkSweepGC"
Như trên là mình sửa từ 128Mb lên 256Mb [caption id="attachment_1011" align="alignnone" width="722"]Sửa dòng JAVA_OPTS lại Sửa dòng JAVA_OPTS lại[/caption] Sau đó thì save lại Khởi động lại tomcat

Một số lệnh bật, tắt Tomcat trên Linux

sudo /etc/init.d/tomcat7 start sudo /etc/init.d/tomcat7 stop sudo /etc/init.d/tomcat7 restart
[caption id="attachment_1018" align="alignnone" width="765"]Một số lệnh bật, tắt Tomcat trên Linux Một số lệnh bật, tắt Tomcat trên Linux[/caption] -Vậy là xong Chúng ta có thể truy cập và thêm Workspaces, Store, Layers vô GeoServer bình thường rồi [caption id="attachment_1016" align="alignnone" width="1053"]GeoServer GeoServer[/caption] -soiqualang_chentreu- Tham khảo:
  • https://stackoverflow.com/questions/6398053/cant-change-tomcat-7-heap-size/10950387#10950387
  • https://gis.stackexchange.com/questions/10428/geoserver-java-out-of-heap-space-how-do-i-increase-it/10435#10435
]]>

Leave a Reply

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