diff --git a/common.hpp b/common.hpp
index ef2ce3d..4b6b141 100644
--- a/common.hpp
+++ b/common.hpp
@@ -41,6 +41,7 @@
 
 #include <list>
 #include <set>
+#include <queue>
 #include <vector>
 
 #include <ndn-cxx/common.hpp>
diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index 5839771..e089a09 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -129,10 +129,7 @@
 bool
 Entry::addNonce(uint32_t nonce)
 {
-  std::pair<std::set<uint32_t>::iterator, bool> insertResult =
-    m_nonces.insert(nonce);
-
-  return insertResult.second;
+  return m_nonceList.add(nonce);
 }
 
 InRecordCollection::iterator
@@ -173,7 +170,7 @@
   }
 
   it->update(interest);
-  m_nonces.insert(interest.getNonce());
+  m_nonceList.add(interest.getNonce());
   return it;
 }
 
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index fb89e27..420bb29 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -26,6 +26,7 @@
 #ifndef NFD_DAEMON_TABLE_PIT_ENTRY_HPP
 #define NFD_DAEMON_TABLE_PIT_ENTRY_HPP
 
+#include "pit-nonce-list.hpp"
 #include "pit-in-record.hpp"
 #include "pit-out-record.hpp"
 #include "core/scheduler.hpp"
@@ -155,7 +156,7 @@
   EventId m_stragglerTimer;
 
 private:
-  std::set<uint32_t> m_nonces;
+  pit::NonceList m_nonceList;
   shared_ptr<const Interest> m_interest;
   InRecordCollection m_inRecords;
   OutRecordCollection m_outRecords;
diff --git a/daemon/table/pit-nonce-list.cpp b/daemon/table/pit-nonce-list.cpp
new file mode 100644
index 0000000..02502ab
--- /dev/null
+++ b/daemon/table/pit-nonce-list.cpp
@@ -0,0 +1,66 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "pit-nonce-list.hpp"
+
+namespace nfd {
+namespace pit {
+
+// The NonceList has limited capacity to avoid memory explosion
+// if PIT entry is constantly refreshed (NFD Bug #1770).
+// Current implementation keeps nonces in a set to detect duplicates,
+// and a queue to evict the oldest nonce when capacity limit is reached.
+// A limitation is that a nonce first appeared at time 0 and duplicated at time 10
+// could be evicted before a nonce appeared only once at time 5;
+// this limitation should not affect normal operation.
+
+const size_t NonceList::CAPACITY = 256;
+
+NonceList::NonceList()
+{
+}
+
+bool
+NonceList::add(uint32_t nonce)
+{
+  bool isNew = m_nonceSet.insert(nonce).second;
+  if (!isNew)
+    return false;
+
+  m_nonceQueue.push(nonce);
+  BOOST_ASSERT(m_nonceSet.size() == m_nonceQueue.size());
+
+  if (m_nonceSet.size() > CAPACITY) {
+    size_t nErased = m_nonceSet.erase(m_nonceQueue.front());
+    BOOST_ASSERT(nErased == 1);
+    m_nonceQueue.pop();
+    BOOST_ASSERT(m_nonceSet.size() == m_nonceQueue.size());
+    BOOST_ASSERT(m_nonceSet.size() <= CAPACITY);
+  }
+  return true;
+}
+
+} // namespace pit
+} // namespace nfd
diff --git a/daemon/table/pit-nonce-list.hpp b/daemon/table/pit-nonce-list.hpp
new file mode 100644
index 0000000..393ae34
--- /dev/null
+++ b/daemon/table/pit-nonce-list.hpp
@@ -0,0 +1,64 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_TABLE_PIT_NONCE_LIST_HPP
+#define NFD_DAEMON_TABLE_PIT_NONCE_LIST_HPP
+
+#include "common.hpp"
+
+namespace nfd {
+namespace pit {
+
+/** \brief represents a Nonce list
+ */
+class NonceList : noncopyable
+{
+public:
+  NonceList();
+
+  /** \brief records a nonce
+   *  \return true if nonce is new; false if nonce is seen before
+   */
+  bool
+  add(uint32_t nonce);
+
+  size_t
+  size() const
+  {
+    return m_nonceSet.size();
+  }
+
+public:
+  static const size_t CAPACITY;
+
+private:
+  std::set<uint32_t> m_nonceSet;
+  std::queue<uint32_t> m_nonceQueue;
+};
+
+} // namespace pit
+} // namespace nfd
+
+#endif // NFD_DAEMON_TABLE_PIT_NONCE_LIST_HPP
diff --git a/tests/daemon/table/pit.cpp b/tests/daemon/table/pit.cpp
index 9e623c1..52013a6 100644
--- a/tests/daemon/table/pit.cpp
+++ b/tests/daemon/table/pit.cpp
@@ -33,6 +33,27 @@
 
 BOOST_FIXTURE_TEST_SUITE(TablePit, BaseFixture)
 
+BOOST_AUTO_TEST_CASE(NonceList)
+{
+  BOOST_REQUIRE_GE(pit::NonceList::CAPACITY, 32);
+  BOOST_REQUIRE_LE(pit::NonceList::CAPACITY, 4096);
+
+  pit::NonceList nl;
+  for (uint32_t nonce = 0; nonce < static_cast<uint32_t>(pit::NonceList::CAPACITY); ++nonce) {
+    BOOST_CHECK_EQUAL(nl.add(nonce), true);
+  }
+  BOOST_CHECK_EQUAL(nl.size(), pit::NonceList::CAPACITY);
+
+  BOOST_CHECK_EQUAL(nl.add(32), false);
+  BOOST_CHECK_EQUAL(nl.size(), pit::NonceList::CAPACITY);
+
+  BOOST_CHECK_EQUAL(nl.add(4096), true);
+  BOOST_CHECK_EQUAL(nl.size(), pit::NonceList::CAPACITY);
+
+  BOOST_CHECK_EQUAL(nl.add(0), true);// 0 is evicted
+  BOOST_CHECK_EQUAL(nl.size(), pit::NonceList::CAPACITY);
+}
+
 BOOST_AUTO_TEST_CASE(EntryInOutRecords)
 {
   shared_ptr<Face> face1 = make_shared<DummyFace>();
